Class SimpleAuthenticationProvider

  • All Implemented Interfaces:
    AuthenticationProvider

    @ThreadSafe
    public final class SimpleAuthenticationProvider
    extends java.lang.Object
    implements AuthenticationProvider
    An authentication provider implementation that allows arbitrary combination of username and password including empty strings.
    • Method Detail

      • authenticate

        public void authenticate​(java.lang.String user,
                                 java.lang.String password)
                          throws javax.security.sasl.AuthenticationException
        Description copied from interface: AuthenticationProvider
        The authenticate method is called by the PlainSaslServerCallbackHandler in the PlainSaslServer layer to authenticate users for their requests. If a user is to be granted, return nothing/throw nothing. When a user is to be disallowed, throw an appropriate AuthenticationException.
        Specified by:
        authenticate in interface AuthenticationProvider
        Parameters:
        user - The username received over the connection request
        password - The password received over the connection request
        Throws:
        javax.security.sasl.AuthenticationException - when a user is found to be invalid by the implementation