Class CasAuthenticator
java.lang.Object
org.pac4j.core.util.InitializableObject
org.pac4j.core.profile.definition.ProfileDefinitionAware
org.pac4j.cas.credentials.authenticator.CasAuthenticator
- All Implemented Interfaces:
org.pac4j.core.credentials.authenticator.Authenticator
public class CasAuthenticator
extends org.pac4j.core.profile.definition.ProfileDefinitionAware
implements org.pac4j.core.credentials.authenticator.Authenticator
CAS authenticator which validates the service ticket.
- Since:
- 1.9.2
- Author:
- Jerome Leleu
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
protected org.pac4j.core.http.callback.CallbackUrlResolver
protected String
protected CasConfiguration
protected org.pac4j.core.logout.handler.SessionLogoutHandler
protected org.pac4j.core.http.url.UrlResolver
Fields inherited from interface org.pac4j.core.credentials.authenticator.Authenticator
ALWAYS_VALIDATE, NEVER_VALIDATE
-
Constructor Summary
ConstructorDescriptionCasAuthenticator
(CasConfiguration configuration, String clientName, org.pac4j.core.http.url.UrlResolver urlResolver, org.pac4j.core.http.callback.CallbackUrlResolver callbackUrlResolver, String callbackUrl, org.pac4j.core.logout.handler.SessionLogoutHandler sessionLogoutHandler) Constructor for CasAuthenticator. -
Method Summary
Modifier and TypeMethodDescriptionprotected org.pac4j.core.profile.UserProfile
createUserProfile
(org.apereo.cas.client.authentication.AttributePrincipal principal) protected void
createUserProfileAttributes
(org.apereo.cas.client.validation.Assertion assertion, org.apereo.cas.client.authentication.AttributePrincipal principal, org.pac4j.core.profile.UserProfile profile) protected void
internalInit
(boolean forceReinit) protected void
recordSession
(org.pac4j.core.context.CallContext ctx, String ticket) Optional<org.pac4j.core.credentials.Credentials>
validate
(org.pac4j.core.context.CallContext ctx, org.pac4j.core.credentials.Credentials cred) protected org.apereo.cas.client.validation.Assertion
validateTicket
(org.pac4j.core.context.WebContext webContext, String ticket) Methods inherited from class org.pac4j.core.profile.definition.ProfileDefinitionAware
getProfileDefinition, setProfileDefinition, setProfileDefinitionIfUndefined
Methods inherited from class org.pac4j.core.util.InitializableObject
afterInternalInit, beforeInternalInit, getInitialized, getLastAttempt, getMaxAttempts, getMinTimeIntervalBetweenAttemptsInMilliseconds, getNbAttempts, init, init, isInitialized, reinit, setMaxAttempts, setMinTimeIntervalBetweenAttemptsInMilliseconds, shouldInitialize, toString
-
Field Details
-
configuration
-
clientName
-
urlResolver
protected org.pac4j.core.http.url.UrlResolver urlResolver -
callbackUrlResolver
protected org.pac4j.core.http.callback.CallbackUrlResolver callbackUrlResolver -
callbackUrl
-
sessionLogoutHandler
protected org.pac4j.core.logout.handler.SessionLogoutHandler sessionLogoutHandler
-
-
Constructor Details
-
CasAuthenticator
public CasAuthenticator(CasConfiguration configuration, String clientName, org.pac4j.core.http.url.UrlResolver urlResolver, org.pac4j.core.http.callback.CallbackUrlResolver callbackUrlResolver, String callbackUrl, org.pac4j.core.logout.handler.SessionLogoutHandler sessionLogoutHandler) Constructor for CasAuthenticator.
- Parameters:
configuration
- aCasConfiguration
objectclientName
- aString
objecturlResolver
- aUrlResolver
objectcallbackUrlResolver
- aCallbackUrlResolver
objectcallbackUrl
- aString
objectsessionLogoutHandler
- the sessionLogoutHandler
-
-
Method Details
-
internalInit
protected void internalInit(boolean forceReinit) - Specified by:
internalInit
in classorg.pac4j.core.util.InitializableObject
-
validate
public Optional<org.pac4j.core.credentials.Credentials> validate(org.pac4j.core.context.CallContext ctx, org.pac4j.core.credentials.Credentials cred) - Specified by:
validate
in interfaceorg.pac4j.core.credentials.authenticator.Authenticator
-
recordSession
-
createUserProfileAttributes
protected void createUserProfileAttributes(org.apereo.cas.client.validation.Assertion assertion, org.apereo.cas.client.authentication.AttributePrincipal principal, org.pac4j.core.profile.UserProfile profile) -
createUserProfile
protected org.pac4j.core.profile.UserProfile createUserProfile(org.apereo.cas.client.authentication.AttributePrincipal principal) -
validateTicket
protected org.apereo.cas.client.validation.Assertion validateTicket(org.pac4j.core.context.WebContext webContext, String ticket) throws org.apereo.cas.client.validation.TicketValidationException - Throws:
org.apereo.cas.client.validation.TicketValidationException
-