C - the type of credentials the authenticator can authenticateP - the type of principals the authenticator returnspublic interface Authenticator<C,P>
| 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 io.dropwizard.auth.AuthenticationException
If the credentials are valid and map to a principal, returns an Optional.of(p).
If the credentials are invalid, returns an Optional.empty().
credentials - a set of user-provided credentialsio.dropwizard.auth.AuthenticationException - if the credentials cannot be authenticated due to an
underlying errorCopyright © 2014. All rights reserved.