Class CustomAuthenticationProvider
- java.lang.Object
-
- alluxio.security.authentication.plain.CustomAuthenticationProvider
-
- All Implemented Interfaces:
AuthenticationProvider
@NotThreadSafe public final class CustomAuthenticationProvider extends java.lang.Object implements AuthenticationProvider
An authentication provider implementation that allowsAuthenticationProvider
to be customized at configuration time. This authentication provider is created if authentication type specified inAlluxioConfiguration
isAuthType.CUSTOM
. It requires the propertyalluxio.security.authentication.custom.provider
to be set inAlluxioConfiguration
to determine which provider to load.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface alluxio.security.authentication.AuthenticationProvider
AuthenticationProvider.Factory
-
-
Constructor Summary
Constructors Constructor Description CustomAuthenticationProvider(java.lang.Class<?> customProviderClass)
Constructs a new custom authentication provider.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
authenticate(java.lang.String user, java.lang.String password)
The authenticate method is called by thePlainSaslServerCallbackHandler
in thePlainSaslServer
layer to authenticate users for their requests.AuthenticationProvider
getCustomProvider()
-
-
-
Method Detail
-
getCustomProvider
public AuthenticationProvider getCustomProvider()
- Returns:
- the custom authentication provider
-
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 thePlainSaslServerCallbackHandler
in thePlainSaslServer
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 appropriateAuthenticationException
.- Specified by:
authenticate
in interfaceAuthenticationProvider
- Parameters:
user
- The username received over the connection requestpassword
- The password received over the connection request- Throws:
javax.security.sasl.AuthenticationException
- when a user is found to be invalid by the implementation
-
-