Class AbstractCredentialsAgent

    • Method Detail

      • getCredentials

        public CredentialsAgentResponse getCredentials​(java.net.Authenticator.RequestorType requestorType,
                                                       java.lang.String host,
                                                       boolean noSuccessWithLastResponse)
                                                throws CredentialsAgentException
        Description copied from interface: CredentialsAgent
        Returns the credentials needed to to access host.
        Specified by:
        getCredentials in interface CredentialsAgent
        Parameters:
        requestorType - the type of service. Authenticator.RequestorType.SERVER for the OSM API server, Authenticator.RequestorType.PROXY for a proxy server
        host - the hostname for these credentials
        noSuccessWithLastResponse - true, if the last request with the supplied credentials failed; false otherwise. If true, implementations of this interface are advised to prompt the user for new credentials.
        Returns:
        the credentials
        Throws:
        CredentialsAgentException - if a problem occurs in a implementation of this interface
      • purgeCredentialsCache

        public final void purgeCredentialsCache​(java.net.Authenticator.RequestorType requestorType)
        Description copied from interface: CredentialsAgent
        Purges the internal credentials cache for the given requestor type.
        Specified by:
        purgeCredentialsCache in interface CredentialsAgent
        Parameters:
        requestorType - the type of service. Authenticator.RequestorType.PROXY for a proxy server, Authenticator.RequestorType.SERVER for other servers.
      • purgeCredentialsCache

        public void purgeCredentialsCache​(java.net.Authenticator.RequestorType requestorType,
                                          java.lang.String host)
        Description copied from interface: CredentialsAgent
        Purges the internal credentials cache for the given requestor type and host.
        Specified by:
        purgeCredentialsCache in interface CredentialsAgent
        Parameters:
        requestorType - the type of service.
        host - the host. Authenticator.RequestorType.PROXY for a proxy server, Authenticator.RequestorType.SERVER for other servers.
      • getSaveUsernameAndPasswordCheckboxText

        public abstract java.lang.String getSaveUsernameAndPasswordCheckboxText()
        Provide the text for a checkbox that offers to save the username and password that has been entered by the user.
        Returns:
        checkbox text