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 |
---|---|
com.google.common.base.Optional<P> |
authenticate(C credentials)
Given a set of user-provided credentials, return an optional principal.
|
com.google.common.base.Optional<P> authenticate(C credentials) throws AuthenticationException
Optional.of(p)
.
If the credentials are invalid, returns an Optional.absent()
.credentials
- a set of user-provided credentialsAuthenticationException
- if the credentials cannot be authenticated due to an
underlying errorCopyright © 2015. All rights reserved.