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
Fields Modifier and Type Field Description protected org.pac4j.core.credentials.authenticator.Authenticator<org.pac4j.core.credentials.UsernamePasswordCredentials>authenticatorThe underlying pac4j authenticator.-
Fields inherited from class org.apereo.cas.integration.pac4j.authentication.handler.support.AbstractWrapperAuthenticationHandler
profileCreator
-
Fields inherited from class org.apereo.cas.authentication.AbstractAuthenticationHandler
credentialSelectionPredicate, principalFactory, servicesManager
-
-
Constructor Summary
Constructors Constructor Description UsernamePasswordWrapperAuthenticationHandler(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.pac4j.core.credentials.UsernamePasswordCredentialsconvertToPac4jCredentials(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.Authenticator<org.pac4j.core.credentials.UsernamePasswordCredentials>getAuthenticator(org.apereo.cas.authentication.Credential credential)Gets authenticator.protected java.lang.Class<org.apereo.cas.authentication.credential.UsernamePasswordCredential>getCasCredentialsType()Return the CAS credential supported by this handler (to be converted in a pac4j credentials byAbstractWrapperAuthenticationHandler.convertToPac4jCredentials(Credential)).booleansupports(java.lang.Class<? extends org.apereo.cas.authentication.Credential> clazz)-
Methods inherited from class org.apereo.cas.integration.pac4j.authentication.handler.support.AbstractWrapperAuthenticationHandler
doAuthentication, getWebContext, supports
-
Methods inherited from class org.apereo.cas.integration.pac4j.authentication.handler.support.AbstractPac4jAuthenticationHandler
createResult, determinePrincipalIdFrom, finalizeAuthenticationHandlerResult, preFinalizeAuthenticationHandlerResult, storeUserProfile
-
Methods inherited from class org.apereo.cas.authentication.handler.support.AbstractPreAndPostProcessingAuthenticationHandler
authenticate, createHandlerResult, createHandlerResult
-
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
-
convertToPac4jCredentials
protected org.pac4j.core.credentials.UsernamePasswordCredentials convertToPac4jCredentials(org.apereo.cas.authentication.credential.UsernamePasswordCredential casCredential) throws java.security.GeneralSecurityExceptionDescription copied from class:AbstractWrapperAuthenticationHandlerConvert a CAS credential into a pac4j credentials to play the authentication.- Specified by:
convertToPac4jCredentialsin classAbstractWrapperAuthenticationHandler<org.apereo.cas.authentication.credential.UsernamePasswordCredential,org.pac4j.core.credentials.UsernamePasswordCredentials>- Parameters:
casCredential- the CAS credential- Returns:
- the pac4j credentials
- Throws:
java.security.GeneralSecurityException- On authentication failure.
-
getAuthenticator
protected org.pac4j.core.credentials.authenticator.Authenticator<org.pac4j.core.credentials.UsernamePasswordCredentials> 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
-
supports
public boolean supports(java.lang.Class<? extends org.apereo.cas.authentication.Credential> clazz)
-
getCasCredentialsType
protected java.lang.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.convertToPac4jCredentials(Credential)).- Specified by:
getCasCredentialsTypein classAbstractWrapperAuthenticationHandler<org.apereo.cas.authentication.credential.UsernamePasswordCredential,org.pac4j.core.credentials.UsernamePasswordCredentials>- Returns:
- the CAS credential class
-
-