Package org.apereo.cas.adaptors.rest
Class RestAuthenticationHandler
- java.lang.Object
-
- org.apereo.cas.authentication.AbstractAuthenticationHandler
-
- org.apereo.cas.authentication.handler.support.AbstractPreAndPostProcessingAuthenticationHandler
-
- org.apereo.cas.authentication.handler.support.AbstractUsernamePasswordAuthenticationHandler
-
- org.apereo.cas.adaptors.rest.RestAuthenticationHandler
-
- All Implemented Interfaces:
org.apereo.cas.authentication.AuthenticationHandler,org.apereo.cas.authentication.PrePostAuthenticationHandler,org.springframework.core.Ordered
public class RestAuthenticationHandler extends org.apereo.cas.authentication.handler.support.AbstractUsernamePasswordAuthenticationHandlerThis isRestAuthenticationHandlerthat authenticates uid/password against a remote rest endpoint based on the status code received. Credentials are passed via basic authn.- Since:
- 5.0.0
-
-
Field Summary
-
Fields inherited from class org.apereo.cas.authentication.handler.support.AbstractUsernamePasswordAuthenticationHandler
passwordPolicyHandlingStrategy
-
Fields inherited from class org.apereo.cas.authentication.AbstractAuthenticationHandler
credentialSelectionPredicate, principalFactory, servicesManager
-
-
Constructor Summary
Constructors Constructor Description RestAuthenticationHandler(java.lang.String name, RestAuthenticationApi api, org.apereo.cas.services.ServicesManager servicesManager, org.apereo.cas.authentication.principal.PrincipalFactory principalFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.apereo.cas.authentication.AuthenticationHandlerExecutionResultauthenticateUsernamePasswordInternal(org.apereo.cas.authentication.credential.UsernamePasswordCredential c, java.lang.String originalPassword)protected java.util.List<org.apereo.cas.authentication.MessageDescriptor>getWarnings(org.springframework.http.ResponseEntity<?> authenticationResponse)Resolvewarningsfrom theauthenticationResponse.-
Methods inherited from class org.apereo.cas.authentication.handler.support.AbstractUsernamePasswordAuthenticationHandler
doAuthentication, getPasswordEncoder, getPasswordPolicyConfiguration, getPasswordPolicyHandlingStrategy, getPrincipalNameTransformer, matches, setPasswordEncoder, setPasswordPolicyConfiguration, setPasswordPolicyHandlingStrategy, setPrincipalNameTransformer, supports, supports, transformPassword, transformUsername
-
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
-
-
-
-
Constructor Detail
-
RestAuthenticationHandler
public RestAuthenticationHandler(java.lang.String name, RestAuthenticationApi api, org.apereo.cas.services.ServicesManager servicesManager, org.apereo.cas.authentication.principal.PrincipalFactory principalFactory)
-
-
Method Detail
-
authenticateUsernamePasswordInternal
protected org.apereo.cas.authentication.AuthenticationHandlerExecutionResult authenticateUsernamePasswordInternal(org.apereo.cas.authentication.credential.UsernamePasswordCredential c, java.lang.String originalPassword) throws java.security.GeneralSecurityException- Specified by:
authenticateUsernamePasswordInternalin classorg.apereo.cas.authentication.handler.support.AbstractUsernamePasswordAuthenticationHandler- Throws:
java.security.GeneralSecurityException
-
getWarnings
protected java.util.List<org.apereo.cas.authentication.MessageDescriptor> getWarnings(org.springframework.http.ResponseEntity<?> authenticationResponse)
Resolvewarningsfrom theauthenticationResponse.- Parameters:
authenticationResponse- The response sent by the REST authentication endpoint- Returns:
- The warnings for the created
AuthenticationHandlerExecutionResult
-
-