Package com.yubico.yubikit.yubiotp
Class ConfigurationState
java.lang.Object
com.yubico.yubikit.yubiotp.ConfigurationState
Data object containing the state of slot programming for a YubiKey.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isConfigured
(Slot slot) Checks if a slot is configured or emptyboolean
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.
-
Method Details
-
isConfigured
Checks if a slot is configured or emptyThis 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
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
-