Class 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.AbstractUsernamePasswordAuthenticationHandler
    This is RestAuthenticationHandler that 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
      • Fields inherited from interface org.apereo.cas.authentication.AuthenticationHandler

        SUCCESSFUL_AUTHENTICATION_HANDLERS
      • Fields inherited from interface org.springframework.core.Ordered

        HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
    • 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.AuthenticationHandlerExecutionResult authenticateUsernamePasswordInternal​(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)
      Resolve warnings from the authenticationResponse.
      • 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
      • Methods inherited from interface org.apereo.cas.authentication.AuthenticationHandler

        getName, getOrder
      • Methods inherited from interface org.apereo.cas.authentication.PrePostAuthenticationHandler

        postAuthenticate, preAuthenticate
    • 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:
        authenticateUsernamePasswordInternal in class org.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)
        Resolve warnings from the authenticationResponse.
        Parameters:
        authenticationResponse - The response sent by the REST authentication endpoint
        Returns:
        The warnings for the created AuthenticationHandlerExecutionResult