C - the type of credentials the authenticator can authenticateP - the type of principals the authenticator returnspublic interface Authenticator<C,P extends Principal>
| Modifier and Type | Method and Description |
|---|---|
Optional<P> |
authenticate(C credentials)
Given a set of user-provided credentials, return an optional principal.
|
Optional<P> authenticate(C credentials) throws AuthenticationException
Optional.of(Object).
If the credentials are invalid, returns an Optional.empty().credentials - a set of user-provided credentialsAuthenticationException - if the credentials cannot be authenticated due to an
underlying errorCopyright © 2017. All rights reserved.