Record Class SignInPolicies.Strong

java.lang.Object
java.lang.Record
com.iizix.server.user.mfa.SignInPolicies.Strong
Record Components:
policy - The policy, StrongAuthPolicy.OFF when the sources set none and when they fail.
problem - The rule the combination breaks, or the value outside its range, in plain words; null when the policy resolved.
Enclosing class:
SignInPolicies

public static record SignInPolicies.Strong(StrongAuthPolicy policy, String problem) extends Record
The strong authentication policy of an application as its sources resolved it, or the problem that keeps them from resolving (CC-SIGNIN-STRONG-POLICY).
Author:
Christopher Mindus
  • Field Details

  • Constructor Details

    • Strong

      public Strong(StrongAuthPolicy policy, String problem)
      Creates an instance of a Strong record class.
      Parameters:
      policy - the value for the policy record component
      problem - the value for the problem record component
  • Method Details

    • isFailed

      public boolean isFailed()
      Checks if the sources failed to resolve: the application fails closed, every sign-in is refused.
      Returns:
      true when they failed.
    • 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.
    • policy

      public StrongAuthPolicy policy()
      Returns the value of the policy record component.
      Returns:
      the value of the policy record component
    • problem

      public String problem()
      Returns the value of the problem record component.
      Returns:
      the value of the problem record component