Class BasicAuthorizationAuthenticator

  • All Implemented Interfaces:
    RequestAuthenticator

    public class BasicAuthorizationAuthenticator
    extends AbstractAuthenticator
    BasicAuthorizationAuthenticator.
    This authenticator provides a basic username/password authentication.
    The request should have a header named Authorization with a value that begins with "Basic" followed by the "username:password" encoded in base64.
    • Constructor Detail

      • BasicAuthorizationAuthenticator

        public BasicAuthorizationAuthenticator​(java.lang.String strUsername,
                                               java.lang.String strPassword)
        Constructor that define credentials
        Parameters:
        strUsername - The username
        strPassword - The password
    • Method Detail

      • isRequestAuthenticated

        public boolean isRequestAuthenticated​(javax.servlet.http.HttpServletRequest request)
        Check the Authentication of a request
        Parameters:
        request - The HTTP request
        Returns:
        true if authenticated, otherwise false
      • getSecurityInformations

        public AuthenticateRequestInformations getSecurityInformations​(java.util.List<java.lang.String> elements)
        return Security informations to put in the request headers and request parameters
        Parameters:
        elements - List of elements to include in the signature
        Returns:
        AuthenticateRequestInformations