Class BasicAuthenticator


  • public class BasicAuthenticator
    extends Authenticator
    Authenticator supporting the BASIC auth method.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String charsetparam  
      static java.lang.String schemeName  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getAuthorization​(java.lang.String requestUri, java.lang.String WWWAuthenticate, java.util.Map<java.lang.String,​java.lang.Object> userProperties)
      Generate the authentication header that will be sent to the server.
      java.lang.String getSchemeName()
      Get the authentication method.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BasicAuthenticator

        public BasicAuthenticator()
    • Method Detail

      • getAuthorization

        public java.lang.String getAuthorization​(java.lang.String requestUri,
                                                 java.lang.String WWWAuthenticate,
                                                 java.util.Map<java.lang.String,​java.lang.Object> userProperties)
                                          throws AuthenticationException
        Description copied from class: Authenticator
        Generate the authentication header that will be sent to the server.
        Specified by:
        getAuthorization in class Authenticator
        Parameters:
        requestUri - The request URI
        WWWAuthenticate - The server auth challenge
        userProperties - The user information
        Returns:
        The auth header
        Throws:
        AuthenticationException - When an error occurs
      • getSchemeName

        public java.lang.String getSchemeName()
        Description copied from class: Authenticator
        Get the authentication method.
        Specified by:
        getSchemeName in class Authenticator
        Returns:
        the auth scheme