Class AbstractPac4jAuthenticationHandler
- java.lang.Object
-
- org.apereo.cas.authentication.AbstractAuthenticationHandler
-
- org.apereo.cas.authentication.handler.support.AbstractPreAndPostProcessingAuthenticationHandler
-
- org.apereo.cas.integration.pac4j.authentication.handler.support.AbstractPac4jAuthenticationHandler
-
- All Implemented Interfaces:
org.apereo.cas.authentication.AuthenticationHandler,org.apereo.cas.authentication.PrePostAuthenticationHandler,org.springframework.core.Ordered
- Direct Known Subclasses:
AbstractWrapperAuthenticationHandler
public abstract class AbstractPac4jAuthenticationHandler extends org.apereo.cas.authentication.handler.support.AbstractPreAndPostProcessingAuthenticationHandlerAbstract pac4j authentication handler which builds the CAS handler result from the pac4j user profile.- Since:
- 4.1.0
-
-
Constructor Summary
Constructors Constructor Description AbstractPac4jAuthenticationHandler(java.lang.String name, org.apereo.cas.services.ServicesManager servicesManager, org.apereo.cas.authentication.principal.PrincipalFactory principalFactory, java.lang.Integer order)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.apereo.cas.authentication.AuthenticationHandlerExecutionResultcreateResult(org.apereo.cas.authentication.principal.ClientCredential credentials, org.pac4j.core.profile.CommonProfile profile, org.pac4j.core.client.BaseClient client)Build the handler result.protected java.lang.StringdeterminePrincipalIdFrom(org.pac4j.core.profile.CommonProfile profile, org.pac4j.core.client.BaseClient client)Determine principal id from profile.protected org.apereo.cas.authentication.AuthenticationHandlerExecutionResultfinalizeAuthenticationHandlerResult(org.apereo.cas.authentication.principal.ClientCredential credentials, org.apereo.cas.authentication.principal.Principal principal, org.pac4j.core.profile.CommonProfile profile, org.pac4j.core.client.BaseClient client)Finalize authentication handler result.protected voidpreFinalizeAuthenticationHandlerResult(org.apereo.cas.authentication.principal.ClientCredential credentials, org.apereo.cas.authentication.principal.Principal principal, org.pac4j.core.profile.CommonProfile profile, org.pac4j.core.client.BaseClient client)Pre finalize authentication handler result.protected voidstoreUserProfile(org.pac4j.core.context.WebContext webContext, org.pac4j.core.profile.CommonProfile profile)Store user profile.-
Methods inherited from class org.apereo.cas.authentication.handler.support.AbstractPreAndPostProcessingAuthenticationHandler
authenticate, createHandlerResult, createHandlerResult, doAuthentication
-
Methods inherited from class org.apereo.cas.authentication.AbstractAuthenticationHandler
getCredentialSelectionPredicate, getName, getOrder, getPrincipalFactory, getServicesManager, setCredentialSelectionPredicate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Method Detail
-
createResult
protected org.apereo.cas.authentication.AuthenticationHandlerExecutionResult createResult(org.apereo.cas.authentication.principal.ClientCredential credentials, org.pac4j.core.profile.CommonProfile profile, org.pac4j.core.client.BaseClient client) throws java.security.GeneralSecurityExceptionBuild the handler result.- Parameters:
credentials- the provided credentialsprofile- the retrieved user profileclient- the client- Returns:
- the built handler result
- Throws:
java.security.GeneralSecurityException- On authentication failure.
-
finalizeAuthenticationHandlerResult
protected org.apereo.cas.authentication.AuthenticationHandlerExecutionResult finalizeAuthenticationHandlerResult(org.apereo.cas.authentication.principal.ClientCredential credentials, org.apereo.cas.authentication.principal.Principal principal, org.pac4j.core.profile.CommonProfile profile, org.pac4j.core.client.BaseClient client)Finalize authentication handler result.- Parameters:
credentials- the credentialsprincipal- the principalprofile- the profileclient- the client- Returns:
- the authentication handler execution result
-
preFinalizeAuthenticationHandlerResult
protected void preFinalizeAuthenticationHandlerResult(org.apereo.cas.authentication.principal.ClientCredential credentials, org.apereo.cas.authentication.principal.Principal principal, org.pac4j.core.profile.CommonProfile profile, org.pac4j.core.client.BaseClient client)Pre finalize authentication handler result.- Parameters:
credentials- the credentialsprincipal- the principalprofile- the profileclient- the client
-
determinePrincipalIdFrom
protected java.lang.String determinePrincipalIdFrom(org.pac4j.core.profile.CommonProfile profile, org.pac4j.core.client.BaseClient client)Determine principal id from profile.- Parameters:
profile- the profileclient- the client- Returns:
- the id
-
storeUserProfile
protected void storeUserProfile(org.pac4j.core.context.WebContext webContext, org.pac4j.core.profile.CommonProfile profile)Store user profile.- Parameters:
webContext- the web contextprofile- the profile
-
-