Class TokenAuthenticationHandler
- java.lang.Object
-
- org.apereo.cas.authentication.AbstractAuthenticationHandler
-
- org.apereo.cas.authentication.handler.support.AbstractPreAndPostProcessingAuthenticationHandler
-
- org.apereo.cas.integration.pac4j.authentication.handler.support.AbstractPac4jAuthenticationHandler
-
- org.apereo.cas.integration.pac4j.authentication.handler.support.AbstractWrapperAuthenticationHandler<org.apereo.cas.authentication.credential.BasicIdentifiableCredential,org.pac4j.core.credentials.TokenCredentials>
-
- org.apereo.cas.integration.pac4j.authentication.handler.support.AbstractTokenWrapperAuthenticationHandler
-
- org.apereo.cas.token.authentication.TokenAuthenticationHandler
-
- All Implemented Interfaces:
org.apereo.cas.authentication.AuthenticationHandler,org.apereo.cas.authentication.PrePostAuthenticationHandler,org.springframework.core.Ordered
public class TokenAuthenticationHandler extends org.apereo.cas.integration.pac4j.authentication.handler.support.AbstractTokenWrapperAuthenticationHandlerThis isTokenAuthenticationHandlerthat authenticates instances ofTokenCredential. There is no need for a separatePrincipalResolvercomponent as this handler will auto-populate the principal attributes itself.- Since:
- 4.2.0
-
-
Field Summary
-
Fields inherited from class org.apereo.cas.integration.pac4j.authentication.handler.support.AbstractWrapperAuthenticationHandler
profileCreator
-
Fields inherited from class org.apereo.cas.integration.pac4j.authentication.handler.support.AbstractPac4jAuthenticationHandler
sessionStore
-
Fields inherited from class org.apereo.cas.authentication.AbstractAuthenticationHandler
principalFactory
-
-
Constructor Summary
Constructors Constructor Description TokenAuthenticationHandler(java.lang.String name, org.apereo.cas.services.ServicesManager servicesManager, org.apereo.cas.authentication.principal.PrincipalFactory principalFactory, org.apereo.cas.authentication.handler.PrincipalNameTransformer principalNameTransformer, org.pac4j.core.context.session.SessionStore sessionStore)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.pac4j.jwt.credentials.authenticator.JwtAuthenticatorbuildJwtAuthenticatorFor(org.apereo.cas.services.RegisteredService service)Build jwt authenticator for service.protected org.pac4j.core.credentials.authenticator.AuthenticatorgetAuthenticator(org.apereo.cas.authentication.Credential credential)protected java.lang.StringgetRegisteredServiceJwtProperty(org.apereo.cas.services.RegisteredService service, org.apereo.cas.services.RegisteredServiceProperty.RegisteredServiceProperties propName)Gets registered service jwt secret.protected org.pac4j.jwt.config.encryption.SecretEncryptionConfigurationgetSecretEncryptionConfiguration(org.apereo.cas.services.RegisteredService service)Gets secret encryption configuration.protected org.pac4j.jwt.config.signature.SecretSignatureConfigurationgetSecretSignatureConfiguration(org.apereo.cas.services.RegisteredService service)Gets secret signature configuration.org.apereo.cas.authentication.AuthenticationHandlerExecutionResultpostAuthenticate(org.apereo.cas.authentication.Credential credential, org.apereo.cas.authentication.AuthenticationHandlerExecutionResult result)-
Methods inherited from class org.apereo.cas.integration.pac4j.authentication.handler.support.AbstractTokenWrapperAuthenticationHandler
convertToPac4jCredentials, getCasCredentialsType, supports
-
Methods inherited from class org.apereo.cas.integration.pac4j.authentication.handler.support.AbstractWrapperAuthenticationHandler
doAuthentication, getWebContext, setProfileCreator, supports
-
Methods inherited from class org.apereo.cas.integration.pac4j.authentication.handler.support.AbstractPac4jAuthenticationHandler
createResult, determinePrincipalIdFrom, finalizeAuthenticationHandlerResult, preFinalizeAuthenticationHandlerResult, setPrincipalAttributeId, setTypedIdUsed, storeUserProfile
-
Methods inherited from class org.apereo.cas.authentication.handler.support.AbstractPreAndPostProcessingAuthenticationHandler
authenticate, createHandlerResult, createHandlerResult
-
Methods inherited from class org.apereo.cas.authentication.AbstractAuthenticationHandler
canEqual, equals, getCredentialSelectionPredicate, getName, getOrder, getPrincipalFactory, getServicesManager, getState, hashCode, setCredentialSelectionPredicate, setState
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Constructor Detail
-
TokenAuthenticationHandler
public TokenAuthenticationHandler(java.lang.String name, org.apereo.cas.services.ServicesManager servicesManager, org.apereo.cas.authentication.principal.PrincipalFactory principalFactory, org.apereo.cas.authentication.handler.PrincipalNameTransformer principalNameTransformer, org.pac4j.core.context.session.SessionStore sessionStore)
-
-
Method Detail
-
postAuthenticate
public org.apereo.cas.authentication.AuthenticationHandlerExecutionResult postAuthenticate(org.apereo.cas.authentication.Credential credential, org.apereo.cas.authentication.AuthenticationHandlerExecutionResult result)
-
getAuthenticator
protected org.pac4j.core.credentials.authenticator.Authenticator getAuthenticator(org.apereo.cas.authentication.Credential credential)
- Specified by:
getAuthenticatorin classorg.apereo.cas.integration.pac4j.authentication.handler.support.AbstractWrapperAuthenticationHandler<org.apereo.cas.authentication.credential.BasicIdentifiableCredential,org.pac4j.core.credentials.TokenCredentials>
-
buildJwtAuthenticatorFor
protected org.pac4j.jwt.credentials.authenticator.JwtAuthenticator buildJwtAuthenticatorFor(org.apereo.cas.services.RegisteredService service)
Build jwt authenticator for service.- Parameters:
service- the service- Returns:
- the jwt authenticator
-
getRegisteredServiceJwtProperty
protected java.lang.String getRegisteredServiceJwtProperty(org.apereo.cas.services.RegisteredService service, org.apereo.cas.services.RegisteredServiceProperty.RegisteredServiceProperties propName)Gets registered service jwt secret.- Parameters:
service- the servicepropName- the prop name- Returns:
- the registered service jwt secret
-
getSecretSignatureConfiguration
protected org.pac4j.jwt.config.signature.SecretSignatureConfiguration getSecretSignatureConfiguration(org.apereo.cas.services.RegisteredService service)
Gets secret signature configuration.- Parameters:
service- the service- Returns:
- the secret signature configuration
-
getSecretEncryptionConfiguration
protected org.pac4j.jwt.config.encryption.SecretEncryptionConfiguration getSecretEncryptionConfiguration(org.apereo.cas.services.RegisteredService service)
Gets secret encryption configuration.- Parameters:
service- the service- Returns:
- the secret encryption configuration
-
-