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.AbstractPreAndPostProcessingAuthenticationHandler
Abstract pac4j authentication handler which builds the CAS handler result from the pac4j user profile.
- Since:
- 4.1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.pac4j.core.context.session.SessionStoreThe session store.Fields inherited from class org.apereo.cas.authentication.AbstractAuthenticationHandler
principalFactoryFields inherited from interface org.apereo.cas.authentication.AuthenticationHandler
SUCCESSFUL_AUTHENTICATION_HANDLERSFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractPac4jAuthenticationHandler(String name, org.apereo.cas.services.ServicesManager servicesManager, org.apereo.cas.authentication.principal.PrincipalFactory principalFactory, Integer order, org.pac4j.core.context.session.SessionStore sessionStore) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apereo.cas.authentication.AuthenticationHandlerExecutionResultcreateResult(org.apereo.cas.authentication.principal.ClientCredential credentials, org.pac4j.core.profile.UserProfile profile, org.pac4j.core.client.BaseClient client, org.apereo.cas.authentication.principal.Service service) protected StringdeterminePrincipalIdFrom(org.pac4j.core.profile.UserProfile 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.UserProfile profile, org.pac4j.core.client.BaseClient client, org.apereo.cas.authentication.principal.Service service) protected org.apereo.cas.authentication.principal.PrincipalfinalizeAuthenticationPrincipal(org.apereo.cas.authentication.principal.Principal initialPrincipal, org.pac4j.core.client.BaseClient client, org.apereo.cas.authentication.principal.ClientCredential credentials, org.apereo.cas.authentication.principal.Service service) protected org.apereo.cas.authentication.AuthenticationHandlerExecutionResultpostFinalizeAuthenticationHandlerResult(org.apereo.cas.authentication.AuthenticationHandlerExecutionResult result, org.apereo.cas.authentication.principal.ClientCredential credentials, org.apereo.cas.authentication.principal.Principal principal, org.pac4j.core.client.BaseClient client, org.apereo.cas.authentication.principal.Service service) protected voidpreFinalizeAuthenticationHandlerResult(org.apereo.cas.authentication.principal.ClientCredential credentials, org.apereo.cas.authentication.principal.Principal principal, org.pac4j.core.profile.UserProfile profile, org.pac4j.core.client.BaseClient client, org.apereo.cas.authentication.principal.Service service) protected voidstoreUserProfile(org.pac4j.core.context.WebContext webContext, org.pac4j.core.profile.UserProfile profile) Store user profile.Methods inherited from class org.apereo.cas.authentication.handler.support.AbstractPreAndPostProcessingAuthenticationHandler
authenticate, createHandlerResult, createHandlerResult, doAuthenticationMethods inherited from class org.apereo.cas.authentication.AbstractAuthenticationHandler
canEqual, equals, getCredentialSelectionPredicate, getName, getOrder, getPrincipalFactory, getServicesManager, getState, hashCode, setCredentialSelectionPredicate, setStateMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apereo.cas.authentication.AuthenticationHandler
getName, getOrder, getState, supports, supportsMethods inherited from interface org.apereo.cas.authentication.PrePostAuthenticationHandler
postAuthenticate, preAuthenticate
-
Field Details
-
sessionStore
protected final org.pac4j.core.context.session.SessionStore sessionStoreThe session store.
-
-
Constructor Details
-
AbstractPac4jAuthenticationHandler
-
-
Method Details
-
createResult
protected org.apereo.cas.authentication.AuthenticationHandlerExecutionResult createResult(org.apereo.cas.authentication.principal.ClientCredential credentials, org.pac4j.core.profile.UserProfile profile, org.pac4j.core.client.BaseClient client, org.apereo.cas.authentication.principal.Service service) throws GeneralSecurityException - Throws:
GeneralSecurityException
-
finalizeAuthenticationPrincipal
protected org.apereo.cas.authentication.principal.Principal finalizeAuthenticationPrincipal(org.apereo.cas.authentication.principal.Principal initialPrincipal, org.pac4j.core.client.BaseClient client, org.apereo.cas.authentication.principal.ClientCredential credentials, org.apereo.cas.authentication.principal.Service service) -
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.UserProfile profile, org.pac4j.core.client.BaseClient client, org.apereo.cas.authentication.principal.Service service) -
postFinalizeAuthenticationHandlerResult
protected org.apereo.cas.authentication.AuthenticationHandlerExecutionResult postFinalizeAuthenticationHandlerResult(org.apereo.cas.authentication.AuthenticationHandlerExecutionResult result, org.apereo.cas.authentication.principal.ClientCredential credentials, org.apereo.cas.authentication.principal.Principal principal, org.pac4j.core.client.BaseClient client, org.apereo.cas.authentication.principal.Service service) -
preFinalizeAuthenticationHandlerResult
protected void preFinalizeAuthenticationHandlerResult(org.apereo.cas.authentication.principal.ClientCredential credentials, org.apereo.cas.authentication.principal.Principal principal, org.pac4j.core.profile.UserProfile profile, org.pac4j.core.client.BaseClient client, org.apereo.cas.authentication.principal.Service service) -
determinePrincipalIdFrom
protected String determinePrincipalIdFrom(org.pac4j.core.profile.UserProfile 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.UserProfile profile) Store user profile.- Parameters:
webContext- the web contextprofile- the profile
-