public class ExampleAuthenticator extends Object implements Authenticator<BasicCredentials,User>
| Constructor and Description |
|---|
ExampleAuthenticator() |
| Modifier and Type | Method and Description |
|---|---|
Optional<User> |
authenticate(BasicCredentials credentials)
Given a set of user-provided credentials, return an optional principal.
|
public Optional<User> authenticate(BasicCredentials credentials) throws AuthenticationException
AuthenticatorOptional.of(Object).
If the credentials are invalid, returns an Optional.empty().authenticate in interface Authenticator<BasicCredentials,User>credentials - a set of user-provided credentialsAuthenticationException - if the credentials cannot be authenticated due to an
underlying errorCopyright © 2020. All rights reserved.