@NotThreadSafe public final class CustomAuthenticationProvider extends Object implements AuthenticationProvider
AuthenticationProvider
to be
customized at configuration time. This authentication provider is created if authentication type
specified in AlluxioConfiguration
is AuthType.CUSTOM
. It requires
the property alluxio.security.authentication.custom.provider
to be set in
AlluxioConfiguration
to determine which provider to load.AuthenticationProvider.Factory
Constructor and Description |
---|
CustomAuthenticationProvider(String providerName)
Constructs a new custom authentication provider.
|
Modifier and Type | Method and Description |
---|---|
void |
authenticate(String user,
String password)
The authenticate method is called by the
PlainSaslServerCallbackHandler in
the PlainSaslServer layer to authenticate users for their requests. |
AuthenticationProvider |
getCustomProvider() |
public CustomAuthenticationProvider(String providerName)
providerName
- the name of the providerpublic AuthenticationProvider getCustomProvider()
public void authenticate(String user, String password) throws AuthenticationException
AuthenticationProvider
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
.authenticate
in interface AuthenticationProvider
user
- The username received over the connection requestpassword
- The password received over the connection requestAuthenticationException
- when a user is found to be invalid by the implementationCopyright © 2023. All Rights Reserved.