Enum Class PinPolicy

java.lang.Object
java.lang.Enum<PinPolicy>
com.yubico.yubikit.piv.PinPolicy
All Implemented Interfaces:
Serializable, Comparable<PinPolicy>, Constable

public enum PinPolicy extends Enum<PinPolicy>
The PIN policy of a private key defines whether or not a PIN is required to use the key.

Setting a PIN policy other than DEFAULT requires YubiKey 4 or later.

  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    The PIN must be verified each time the key is to be used, just prior to using it.
    The default behavior for the particular key slot is used.
    PIN or biometrics must be verified each time the key is to be used, just prior to using it.
    PIN or biometrics must be verified for the session, prior to using the key.
    The PIN is never required for using the key.
    The PIN must be verified for the session, prior to using the key.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final int
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static PinPolicy
    fromValue(int value)
    Returns the PIN policy corresponding to the given PIV application constant.
    static PinPolicy
    Returns the enum constant of this class with the specified name.
    static PinPolicy[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • DEFAULT

      public static final PinPolicy DEFAULT
      The default behavior for the particular key slot is used.
    • NEVER

      public static final PinPolicy NEVER
      The PIN is never required for using the key.
    • ONCE

      public static final PinPolicy ONCE
      The PIN must be verified for the session, prior to using the key.
    • ALWAYS

      public static final PinPolicy ALWAYS
      The PIN must be verified each time the key is to be used, just prior to using it.
    • MATCH_ONCE

      public static final PinPolicy MATCH_ONCE
      PIN or biometrics must be verified for the session, prior to using the key.
    • MATCH_ALWAYS

      public static final PinPolicy MATCH_ALWAYS
      PIN or biometrics must be verified each time the key is to be used, just prior to using it.
  • Field Details

    • value

      public final int value
  • Method Details

    • values

      public static PinPolicy[] 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 PinPolicy 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
    • fromValue

      public static PinPolicy fromValue(int value)
      Returns the PIN policy corresponding to the given PIV application constant.