Enum Class StrongAuthPolicy.Preset

java.lang.Object
java.lang.Enum<StrongAuthPolicy.Preset>
com.iizix.user.StrongAuthPolicy.Preset
All Implemented Interfaces:
Serializable, Comparable<StrongAuthPolicy.Preset>, Constable
Enclosing class:
StrongAuthPolicy

public static enum StrongAuthPolicy.Preset extends Enum<StrongAuthPolicy.Preset>
The presets of ServerAdmin's dialog (section 2.2 of the design): a count, a device rule and a floor, every supported factor allowed, none mandatory, every user bound. A preset above the supported maximum (isSupported(): the two of count 3 until the biometric device key is supported) is shown and never accepted.
Author:
Christopher Mindus
  • Enum Constant Details

  • Field Details

    • count

      public final int count
      The count.
    • device

      public final StrongAuthPolicy.Device device
      The device rule.
    • floor

      public final int floor
      The floor.
  • Method Details

    • values

      public static StrongAuthPolicy.Preset[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static StrongAuthPolicy.Preset valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • policy

      public StrongAuthPolicy policy()
      Gets the policy of the preset under the factors supported now (StrongAuthSupport): every supported factor allowed, none mandatory, every user bound.
      Returns:
      The policy, StrongAuthPolicy.OFF for OFF.
    • isSupported

      public boolean isSupported()
      Checks if the preset can be set today: its count is within the supported maximum (StrongAuthSupport.maxCount()).
      Returns:
      true when a setting may name it.