Package org.apereo.cas.authentication
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
ConstructorsConstructorDescriptionDefaultMultifactorAuthenticationContextValidator(String authenticationContextAttribute, String mfaTrustedAuthnAttributeName, org.springframework.context.ConfigurableApplicationContext applicationContext) Creates an instance of aDefaultMultifactorAuthenticationContextValidatorrecord class. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.context.ConfigurableApplicationContextReturns the value of theapplicationContextrecord component.Returns the value of theauthenticationContextAttributerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of themfaTrustedAuthnAttributeNamerecord component.final StringtoString()Returns a string representation of this record class.org.apereo.cas.authentication.MultifactorAuthenticationContextValidationResultvalidate(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.
-
Constructor Details
-
DefaultMultifactorAuthenticationContextValidator
public DefaultMultifactorAuthenticationContextValidator(String authenticationContextAttribute, String mfaTrustedAuthnAttributeName, org.springframework.context.ConfigurableApplicationContext applicationContext) Creates an instance of aDefaultMultifactorAuthenticationContextValidatorrecord class.- Parameters:
authenticationContextAttribute- the value for theauthenticationContextAttributerecord componentmfaTrustedAuthnAttributeName- the value for themfaTrustedAuthnAttributeNamerecord componentapplicationContext- the value for theapplicationContextrecord 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:
validatein interfaceorg.apereo.cas.authentication.MultifactorAuthenticationContextValidator- Parameters:
authentication- the authenticationrequestedContext- the requested contextservice- the service- Returns:
- validation result
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
authenticationContextAttribute
Returns the value of theauthenticationContextAttributerecord component.- Returns:
- the value of the
authenticationContextAttributerecord component
-
mfaTrustedAuthnAttributeName
Returns the value of themfaTrustedAuthnAttributeNamerecord component.- Returns:
- the value of the
mfaTrustedAuthnAttributeNamerecord component
-
applicationContext
public org.springframework.context.ConfigurableApplicationContext applicationContext()Returns the value of theapplicationContextrecord component.- Returns:
- the value of the
applicationContextrecord component
-