Class UsernamePasswordWrapperAuthenticationHandler
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.UsernamePasswordCredential,org.pac4j.core.credentials.UsernamePasswordCredentials>
org.apereo.cas.integration.pac4j.authentication.handler.support.UsernamePasswordWrapperAuthenticationHandler
- All Implemented Interfaces:
org.apereo.cas.authentication.AuthenticationHandler,org.apereo.cas.authentication.PrePostAuthenticationHandler,org.springframework.core.Ordered
public class UsernamePasswordWrapperAuthenticationHandler
extends AbstractWrapperAuthenticationHandler<org.apereo.cas.authentication.credential.UsernamePasswordCredential,org.pac4j.core.credentials.UsernamePasswordCredentials>
Pac4j authentication handler which works on a CAS username / password credential
and uses a pac4j authenticator and profile creator to play authentication.
- Since:
- 4.2.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.pac4j.core.credentials.authenticator.AuthenticatorThe underlying pac4j authenticator.Fields inherited from class org.apereo.cas.integration.pac4j.authentication.handler.support.AbstractWrapperAuthenticationHandler
profileCreatorFields inherited from class org.apereo.cas.integration.pac4j.authentication.handler.support.AbstractPac4jAuthenticationHandler
sessionStoreFields 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
ConstructorsConstructorDescriptionUsernamePasswordWrapperAuthenticationHandler(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.pac4j.core.credentials.UsernamePasswordCredentialsconvertToCredentials(org.apereo.cas.authentication.credential.UsernamePasswordCredential casCredential) Convert a CAS credential into a pac4j credentials to play the authentication.protected org.pac4j.core.credentials.authenticator.AuthenticatorgetAuthenticator(org.apereo.cas.authentication.Credential credential) Gets authenticator.protected Class<org.apereo.cas.authentication.credential.UsernamePasswordCredential>Return the CAS credential supported by this handler (to be converted in a pac4j credentials byAbstractWrapperAuthenticationHandler.convertToCredentials(Credential)).booleanMethods inherited from class org.apereo.cas.integration.pac4j.authentication.handler.support.AbstractWrapperAuthenticationHandler
doAuthentication, getWebContext, supportsMethods inherited from class org.apereo.cas.integration.pac4j.authentication.handler.support.AbstractPac4jAuthenticationHandler
createResult, determinePrincipalIdFrom, finalizeAuthenticationHandlerResult, finalizeAuthenticationPrincipal, postFinalizeAuthenticationHandlerResult, preFinalizeAuthenticationHandlerResult, storeUserProfileMethods inherited from class org.apereo.cas.authentication.handler.support.AbstractPreAndPostProcessingAuthenticationHandler
authenticate, createHandlerResult, createHandlerResultMethods 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, getStateMethods inherited from interface org.apereo.cas.authentication.PrePostAuthenticationHandler
postAuthenticate, preAuthenticate
-
Field Details
-
authenticator
protected org.pac4j.core.credentials.authenticator.Authenticator authenticatorThe underlying pac4j authenticator.
-
-
Constructor Details
-
UsernamePasswordWrapperAuthenticationHandler
-
-
Method Details
-
supports
-
convertToCredentials
protected org.pac4j.core.credentials.UsernamePasswordCredentials convertToCredentials(org.apereo.cas.authentication.credential.UsernamePasswordCredential casCredential) throws GeneralSecurityException Description copied from class:AbstractWrapperAuthenticationHandlerConvert a CAS credential into a pac4j credentials to play the authentication.- Specified by:
convertToCredentialsin classAbstractWrapperAuthenticationHandler<org.apereo.cas.authentication.credential.UsernamePasswordCredential,org.pac4j.core.credentials.UsernamePasswordCredentials> - Parameters:
casCredential- the CAS credential- Returns:
- the pac4j credentials
- Throws:
GeneralSecurityException- On authentication failure.
-
getAuthenticator
protected org.pac4j.core.credentials.authenticator.Authenticator getAuthenticator(org.apereo.cas.authentication.Credential credential) Description copied from class:AbstractWrapperAuthenticationHandlerGets authenticator.- Specified by:
getAuthenticatorin classAbstractWrapperAuthenticationHandler<org.apereo.cas.authentication.credential.UsernamePasswordCredential,org.pac4j.core.credentials.UsernamePasswordCredentials> - Parameters:
credential- the credential- Returns:
- the authenticator
-
getCasCredentialsType
protected Class<org.apereo.cas.authentication.credential.UsernamePasswordCredential> getCasCredentialsType()Description copied from class:AbstractWrapperAuthenticationHandlerReturn the CAS credential supported by this handler (to be converted in a pac4j credentials byAbstractWrapperAuthenticationHandler.convertToCredentials(Credential)).- Specified by:
getCasCredentialsTypein classAbstractWrapperAuthenticationHandler<org.apereo.cas.authentication.credential.UsernamePasswordCredential,org.pac4j.core.credentials.UsernamePasswordCredentials> - Returns:
- the CAS credential class
-