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

    Fields
    Modifier and Type
    Field
    Description
    protected final org.pac4j.core.context.session.SessionStore
    The session store.

    Fields inherited from class org.apereo.cas.authentication.AbstractAuthenticationHandler

    principalFactory

    Fields inherited from interface org.apereo.cas.authentication.AuthenticationHandler

    SUCCESSFUL_AUTHENTICATION_HANDLERS

    Fields inherited from interface org.springframework.core.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    AbstractPac4jAuthenticationHandler(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 Type
    Method
    Description
    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)
     
    protected String
    determinePrincipalIdFrom(org.pac4j.core.profile.UserProfile profile, org.pac4j.core.client.BaseClient client)
    Determine principal id from profile.
    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)
     
    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)
     
    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)
     
    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)
     
    protected void
    storeUserProfile(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, doAuthentication

    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

    Methods inherited from interface org.apereo.cas.authentication.AuthenticationHandler

    getName, getOrder, getState, supports, supports

    Methods inherited from interface org.apereo.cas.authentication.PrePostAuthenticationHandler

    postAuthenticate, preAuthenticate
  • Field Details

    • sessionStore

      protected final org.pac4j.core.context.session.SessionStore sessionStore
      The session store.
  • Constructor Details

    • AbstractPac4jAuthenticationHandler

      protected AbstractPac4jAuthenticationHandler(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 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 profile
      client - 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 context
      profile - the profile