Record Class DefaultMultifactorAuthenticationContextValidator

java.lang.Object
java.lang.Record
org.apereo.cas.authentication.DefaultMultifactorAuthenticationContextValidator
All Implemented Interfaces:
org.apereo.cas.authentication.MultifactorAuthenticationContextValidator

public record DefaultMultifactorAuthenticationContextValidator(String authenticationContextAttribute, String mfaTrustedAuthnAttributeName, org.springframework.context.ConfigurableApplicationContext applicationContext) extends Record implements org.apereo.cas.authentication.MultifactorAuthenticationContextValidator
The DefaultMultifactorAuthenticationContextValidator is responsible for evaluating an authentication object to see whether it satisfied a requested authentication context.
Since:
4.3
  • Field Summary

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

    BEAN_NAME
  • Constructor Summary

    Constructors
    Constructor
    Description
    DefaultMultifactorAuthenticationContextValidator(String authenticationContextAttribute, String mfaTrustedAuthnAttributeName, org.springframework.context.ConfigurableApplicationContext applicationContext)
    Creates an instance of a DefaultMultifactorAuthenticationContextValidator record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.context.ConfigurableApplicationContext
    Returns the value of the applicationContext record component.
    Returns the value of the authenticationContextAttribute record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    Returns the value of the mfaTrustedAuthnAttributeName record component.
    final String
    Returns a string representation of this record class.
    org.apereo.cas.authentication.MultifactorAuthenticationContextValidationResult
    validate(org.apereo.cas.authentication.Authentication authentication, String requestedContext, Optional<org.apereo.cas.services.RegisteredService> service)
    If the authentication event is established as part trusted/device browser such that MFA was skipped, allow for validation to execute successfully.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • DefaultMultifactorAuthenticationContextValidator

      public DefaultMultifactorAuthenticationContextValidator(String authenticationContextAttribute, String mfaTrustedAuthnAttributeName, org.springframework.context.ConfigurableApplicationContext applicationContext)
      Creates an instance of a DefaultMultifactorAuthenticationContextValidator record class.
      Parameters:
      authenticationContextAttribute - the value for the authenticationContextAttribute record component
      mfaTrustedAuthnAttributeName - the value for the mfaTrustedAuthnAttributeName record component
      applicationContext - the value for the applicationContext record component
  • Method Details

    • validate

      public org.apereo.cas.authentication.MultifactorAuthenticationContextValidationResult validate(org.apereo.cas.authentication.Authentication authentication, String requestedContext, Optional<org.apereo.cas.services.RegisteredService> service)
      If the authentication event is established as part trusted/device browser such that MFA was skipped, allow for validation to execute successfully. If authentication event did bypass MFA, allow for validation to execute successfully.
      Specified by:
      validate in interface org.apereo.cas.authentication.MultifactorAuthenticationContextValidator
      Parameters:
      authentication - the authentication
      requestedContext - the requested context
      service - the service
      Returns:
      validation result
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • authenticationContextAttribute

      public String authenticationContextAttribute()
      Returns the value of the authenticationContextAttribute record component.
      Returns:
      the value of the authenticationContextAttribute record component
    • mfaTrustedAuthnAttributeName

      public String mfaTrustedAuthnAttributeName()
      Returns the value of the mfaTrustedAuthnAttributeName record component.
      Returns:
      the value of the mfaTrustedAuthnAttributeName record component
    • applicationContext

      public org.springframework.context.ConfigurableApplicationContext applicationContext()
      Returns the value of the applicationContext record component.
      Returns:
      the value of the applicationContext record component