public abstract class AbstractUsernamePasswordAuthenticationHandler extends AbstractPreAndPostProcessingAuthenticationHandler
principalFactory, servicesManager| Constructor and Description |
|---|
AbstractUsernamePasswordAuthenticationHandler(java.lang.String name,
org.apereo.cas.services.ServicesManager servicesManager,
org.apereo.cas.authentication.principal.PrincipalFactory principalFactory,
java.lang.Integer order) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract org.apereo.cas.authentication.HandlerResult |
authenticateUsernamePasswordInternal(UsernamePasswordCredential transformedCredential,
java.lang.String originalPassword)
Authenticates a username/password credential by an arbitrary strategy with extra parameter original credential password before
encoding password.
|
protected org.apereo.cas.authentication.HandlerResult |
doAuthentication(org.apereo.cas.authentication.Credential credential)
Performs the details of authentication and returns an authentication handler result on success.
|
protected PasswordPolicyConfiguration |
getPasswordPolicyConfiguration() |
protected boolean |
matches(java.lang.CharSequence charSequence,
java.lang.String password)
Used in case passwordEncoder is used to match raw password with encoded password.
|
void |
setCredentialSelectionPredicate(java.util.function.Predicate<org.apereo.cas.authentication.Credential> credentialSelectionPredicate) |
void |
setPasswordEncoder(org.springframework.security.crypto.password.PasswordEncoder passwordEncoder) |
void |
setPasswordPolicyConfiguration(PasswordPolicyConfiguration passwordPolicyConfiguration) |
void |
setPrincipalNameTransformer(org.apereo.cas.authentication.handler.PrincipalNameTransformer principalNameTransformer) |
boolean |
supports(org.apereo.cas.authentication.Credential credential) |
authenticate, createHandlerResultgetName, getOrderclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic AbstractUsernamePasswordAuthenticationHandler(java.lang.String name,
org.apereo.cas.services.ServicesManager servicesManager,
org.apereo.cas.authentication.principal.PrincipalFactory principalFactory,
java.lang.Integer order)
protected org.apereo.cas.authentication.HandlerResult doAuthentication(org.apereo.cas.authentication.Credential credential)
throws java.security.GeneralSecurityException,
org.apereo.cas.authentication.PreventedException
AbstractPreAndPostProcessingAuthenticationHandlerdoAuthentication in class AbstractPreAndPostProcessingAuthenticationHandlercredential - Credential to authenticate.java.security.GeneralSecurityException - On authentication failure that is thrown out to the caller of
AbstractPreAndPostProcessingAuthenticationHandler.authenticate(Credential).org.apereo.cas.authentication.PreventedException - On the indeterminate case when authentication is prevented.protected abstract org.apereo.cas.authentication.HandlerResult authenticateUsernamePasswordInternal(UsernamePasswordCredential transformedCredential, java.lang.String originalPassword) throws java.security.GeneralSecurityException, org.apereo.cas.authentication.PreventedException
transformedCredential - the credential object bearing the transformed username and password.originalPassword - original password from credential before password encodingjava.security.GeneralSecurityException - On authentication failure.org.apereo.cas.authentication.PreventedException - On the indeterminate case when authentication is prevented.protected PasswordPolicyConfiguration getPasswordPolicyConfiguration()
public void setPasswordEncoder(org.springframework.security.crypto.password.PasswordEncoder passwordEncoder)
public void setCredentialSelectionPredicate(java.util.function.Predicate<org.apereo.cas.authentication.Credential> credentialSelectionPredicate)
public void setPrincipalNameTransformer(org.apereo.cas.authentication.handler.PrincipalNameTransformer principalNameTransformer)
public void setPasswordPolicyConfiguration(PasswordPolicyConfiguration passwordPolicyConfiguration)
public boolean supports(org.apereo.cas.authentication.Credential credential)
protected boolean matches(java.lang.CharSequence charSequence,
java.lang.String password)
charSequence - raw not encoded passwordpassword - encoded password to compare with