public class TokenAuthenticationHandler extends AbstractTokenWrapperAuthenticationHandler
TokenAuthenticationHandler
that authenticates instances of TokenCredential
.
There is no need for a separate PrincipalResolver
component
as this handler will auto-populate the principal attributes itself.profileCreator
credentialSelectionPredicate, principalFactory, servicesManager
SUCCESSFUL_AUTHENTICATION_HANDLERS
Constructor and Description |
---|
TokenAuthenticationHandler(java.lang.String name,
ServicesManager servicesManager,
PrincipalFactory principalFactory,
PrincipalNameTransformer principalNameTransformer) |
Modifier and Type | Method and Description |
---|---|
protected org.pac4j.core.credentials.authenticator.Authenticator<org.pac4j.core.credentials.TokenCredentials> |
getAuthenticator(Credential credential)
Gets authenticator.
|
protected java.lang.String |
getRegisteredServiceJwtProperty(RegisteredService service,
RegisteredServiceProperty.RegisteredServiceProperties propName)
Gets registered service jwt secret.
|
AuthenticationHandlerExecutionResult |
postAuthenticate(Credential credential,
AuthenticationHandlerExecutionResult result)
Template method to perform arbitrary post-authentication actions.
|
convertToPac4jCredentials, getCasCredentialsType
doAuthentication, getWebContext, supports
createResult, determinePrincipalIdFrom
authenticate, createHandlerResult, createHandlerResult
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
preAuthenticate
getName, getOrder
public TokenAuthenticationHandler(java.lang.String name, ServicesManager servicesManager, PrincipalFactory principalFactory, PrincipalNameTransformer principalNameTransformer)
public AuthenticationHandlerExecutionResult postAuthenticate(Credential credential, AuthenticationHandlerExecutionResult result)
PrePostAuthenticationHandler
credential
- the supplied credentialresult
- the result of the authentication attempt.protected org.pac4j.core.credentials.authenticator.Authenticator<org.pac4j.core.credentials.TokenCredentials> getAuthenticator(Credential credential)
AbstractWrapperAuthenticationHandler
getAuthenticator
in class AbstractWrapperAuthenticationHandler<BasicIdentifiableCredential,org.pac4j.core.credentials.TokenCredentials>
credential
- the credentialprotected java.lang.String getRegisteredServiceJwtProperty(RegisteredService service, RegisteredServiceProperty.RegisteredServiceProperties propName)
service
- the servicepropName
- the prop name