Class AbstractAuthenticationHandler

java.lang.Object
org.apereo.cas.authentication.AbstractAuthenticationHandler
All Implemented Interfaces:
org.apereo.cas.authentication.AuthenticationHandler, org.apereo.cas.util.NamedObject, org.springframework.core.Ordered
Direct Known Subclasses:
AbstractPreAndPostProcessingAuthenticationHandler, ProxyAuthenticationHandler

public abstract class AbstractAuthenticationHandler extends Object implements org.apereo.cas.authentication.AuthenticationHandler
Base class for all authentication handlers that support configurable naming.
Since:
4.0.0
  • Field Summary

    Fields inherited from interface org.apereo.cas.authentication.AuthenticationHandler

    SUCCESSFUL_AUTHENTICATION_HANDLERS

    Fields inherited from interface org.springframework.core.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    Predicate<org.apereo.cas.authentication.Credential>
    Indicates whether this handler is able to support the credentials passed to operate on it and validate.
    Sets the authentication handler name.
    int
    Sets order.
    org.apereo.cas.authentication.principal.PrincipalFactory
    Factory to create the principal type.
    org.apereo.cas.services.ServicesManager
    The services manager instance, as the entry point to the registry.
    org.apereo.cas.configuration.model.core.authentication.AuthenticationHandlerStates
    Define the scope and state of this authentication handler and the lifecycle in which it can be invoked or activated.
    int
     
    void
    setCredentialSelectionPredicate(Predicate<org.apereo.cas.authentication.Credential> credentialSelectionPredicate)
    Indicates whether this handler is able to support the credentials passed to operate on it and validate.
    void
    setState(org.apereo.cas.configuration.model.core.authentication.AuthenticationHandlerStates state)
    Define the scope and state of this authentication handler and the lifecycle in which it can be invoked or activated.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apereo.cas.authentication.AuthenticationHandler

    authenticate, supports, supports
  • Method Details

    • getPrincipalFactory

      public org.apereo.cas.authentication.principal.PrincipalFactory getPrincipalFactory()
      Factory to create the principal type.
    • getServicesManager

      public org.apereo.cas.services.ServicesManager getServicesManager()
      The services manager instance, as the entry point to the registry.
    • getName

      public String getName()
      Sets the authentication handler name. Authentication handler names SHOULD be unique within an AuthenticationManager, and particular implementations may require uniqueness. Uniqueness is a best practice generally.
      Specified by:
      getName in interface org.apereo.cas.util.NamedObject
    • getOrder

      public int getOrder()
      Sets order. If order is undefined, generates a random order value. Since handlers are generally sorted by this order, it's important that order numbers be unique on a best-effort basis.
      Specified by:
      getOrder in interface org.apereo.cas.authentication.AuthenticationHandler
      Specified by:
      getOrder in interface org.springframework.core.Ordered
    • getCredentialSelectionPredicate

      public Predicate<org.apereo.cas.authentication.Credential> getCredentialSelectionPredicate()
      Indicates whether this handler is able to support the credentials passed to operate on it and validate. Default is true.
    • getState

      public org.apereo.cas.configuration.model.core.authentication.AuthenticationHandlerStates getState()
      Define the scope and state of this authentication handler and the lifecycle in which it can be invoked or activated.
      Specified by:
      getState in interface org.apereo.cas.authentication.AuthenticationHandler
    • setCredentialSelectionPredicate

      public void setCredentialSelectionPredicate(Predicate<org.apereo.cas.authentication.Credential> credentialSelectionPredicate)
      Indicates whether this handler is able to support the credentials passed to operate on it and validate. Default is true.
    • setState

      public void setState(org.apereo.cas.configuration.model.core.authentication.AuthenticationHandlerStates state)
      Define the scope and state of this authentication handler and the lifecycle in which it can be invoked or activated.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object