Record Class MfaPolicyService.MfaPolicy

java.lang.Object
java.lang.Record
org.chenile.security.auth.framework.contract.MfaPolicyService.MfaPolicy
Enclosing interface:
MfaPolicyService

public static record MfaPolicyService.MfaPolicy(boolean required, String providerKey, AuthProviderType providerType, String displayName, String destinationHint, Duration challengeTtl, List<AuthProviderType> allowedProviderTypes) extends Record
  • Field Details

    • required

      private final boolean required
      The field for the required record component.
    • providerKey

      private final String providerKey
      The field for the providerKey record component.
    • providerType

      private final AuthProviderType providerType
      The field for the providerType record component.
    • displayName

      private final String displayName
      The field for the displayName record component.
    • destinationHint

      private final String destinationHint
      The field for the destinationHint record component.
    • challengeTtl

      private final Duration challengeTtl
      The field for the challengeTtl record component.
    • allowedProviderTypes

      private final List<AuthProviderType> allowedProviderTypes
      The field for the allowedProviderTypes record component.
  • Constructor Details

    • MfaPolicy

      public MfaPolicy(boolean required, String providerKey, AuthProviderType providerType, String displayName, String destinationHint, Duration challengeTtl, List<AuthProviderType> allowedProviderTypes)
      Creates an instance of a MfaPolicy record class.
      Parameters:
      required - the value for the required record component
      providerKey - the value for the providerKey record component
      providerType - the value for the providerType record component
      displayName - the value for the displayName record component
      destinationHint - the value for the destinationHint record component
      challengeTtl - the value for the challengeTtl record component
      allowedProviderTypes - the value for the allowedProviderTypes record component
  • Method Details

    • notRequired

      public static MfaPolicyService.MfaPolicy notRequired()
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      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.
    • required

      public boolean required()
      Returns the value of the required record component.
      Returns:
      the value of the required record component
    • providerKey

      public String providerKey()
      Returns the value of the providerKey record component.
      Returns:
      the value of the providerKey record component
    • providerType

      public AuthProviderType providerType()
      Returns the value of the providerType record component.
      Returns:
      the value of the providerType record component
    • displayName

      public String displayName()
      Returns the value of the displayName record component.
      Returns:
      the value of the displayName record component
    • destinationHint

      public String destinationHint()
      Returns the value of the destinationHint record component.
      Returns:
      the value of the destinationHint record component
    • challengeTtl

      public Duration challengeTtl()
      Returns the value of the challengeTtl record component.
      Returns:
      the value of the challengeTtl record component
    • allowedProviderTypes

      public List<AuthProviderType> allowedProviderTypes()
      Returns the value of the allowedProviderTypes record component.
      Returns:
      the value of the allowedProviderTypes record component