Class ConfigurationState


  • public class ConfigurationState
    extends java.lang.Object
    Data object containing the state of slot programming for a YubiKey.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isConfigured​(Slot slot)
      Checks if a slot is configured or empty
      boolean isLedInverted()
      Checks if the LED has been configured to be inverted.
      boolean isTouchTriggered​(Slot slot)
      Checks if a configured slot is triggered by touch or not.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • isConfigured

        public boolean isConfigured​(Slot slot)
        Checks if a slot is configured or empty

        This functionality requires support for YubiOtpSession.FEATURE_CHECK_CONFIGURED, available on YubiKey 2.1 or later.

        Parameters:
        slot - the slot to check
        Returns:
        true if the slot holds configuration, false if empty
      • isTouchTriggered

        public boolean isTouchTriggered​(Slot slot)
        Checks if a configured slot is triggered by touch or not.

        This functionality requires support for YubiOtpSession.FEATURE_CHECK_TOUCH_TRIGGERED, available on YubiKey 3.0 or later. A slot is triggered by touch if a user-initiated touch of the sensor causes it to output a payload over the keyboard interface. Only HMAC-SHA1 challenge-response credentials are not triggered by touch.

        Parameters:
        slot - the slot to check
        Returns:
        true of the slot is triggered by touch, false if not (or if checking isn't supported)
      • isLedInverted

        public boolean isLedInverted()
        Checks if the LED has been configured to be inverted.
        Returns:
        true if inverted, false if not