Class DeviceInfo


  • public class DeviceInfo
    extends java.lang.Object
    Contains metadata, including Device Configuration, of a YubiKey.
    • Constructor Summary

      Constructors 
      Constructor Description
      DeviceInfo​(DeviceConfig config, java.lang.Integer serialNumber, com.yubico.yubikit.core.Version version, FormFactor formFactor, java.util.Map<com.yubico.yubikit.core.Transport,​java.lang.Integer> supportedCapabilities, boolean isLocked)
      Deprecated.
      DeviceInfo​(DeviceConfig config, java.lang.Integer serialNumber, com.yubico.yubikit.core.Version version, FormFactor formFactor, java.util.Map<com.yubico.yubikit.core.Transport,​java.lang.Integer> supportedCapabilities, boolean isLocked, boolean isFips, boolean isSky)
      Constructs a new DeviceInfo.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      DeviceConfig getConfig()
      Returns the current Device configuration of the YubiKey.
      FormFactor getFormFactor()
      Returns the form factor of the YubiKey.
      java.lang.Integer getSerialNumber()
      Returns the serial number of the YubiKey, if available.
      int getSupportedCapabilities​(com.yubico.yubikit.core.Transport transport)
      Returns the supported (not necessarily enabled) capabilities for a given transport.
      com.yubico.yubikit.core.Version getVersion()
      Returns the version number of the YubiKey firmware.
      boolean hasTransport​(com.yubico.yubikit.core.Transport transport)
      Returns whether or not a specific transport is available on this YubiKey.
      boolean isFips()
      Returns whether or not this is a FIPS compliant device
      boolean isLocked()
      Returns whether or not a Configuration Lock is set for the Management application on the YubiKey.
      boolean isSky()
      Returns whether or not this is a Security key
      • Methods inherited from class java.lang.Object

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

      • DeviceInfo

        public DeviceInfo​(DeviceConfig config,
                          @Nullable
                          java.lang.Integer serialNumber,
                          com.yubico.yubikit.core.Version version,
                          FormFactor formFactor,
                          java.util.Map<com.yubico.yubikit.core.Transport,​java.lang.Integer> supportedCapabilities,
                          boolean isLocked,
                          boolean isFips,
                          boolean isSky)
        Constructs a new DeviceInfo.
        Parameters:
        config - the mutable configuration of the YubiKey
        serialNumber - the YubiKeys serial number
        version - the firmware version of the YubiKey
        formFactor - the YubiKeys physical form factor
        supportedCapabilities - the capabilities supported by the YubiKey
        isLocked - whether or not the configuration is protected by a lock code
        isFips - whether or not the YubiKey is a FIPS model
        isSky - whether or not the YubiKey is a Security Key by Yubico model
      • DeviceInfo

        @Deprecated
        public DeviceInfo​(DeviceConfig config,
                          @Nullable
                          java.lang.Integer serialNumber,
                          com.yubico.yubikit.core.Version version,
                          FormFactor formFactor,
                          java.util.Map<com.yubico.yubikit.core.Transport,​java.lang.Integer> supportedCapabilities,
                          boolean isLocked)
        Deprecated.
        Legacy constructor, retained for backwards compatibility until 3.0.0.
    • Method Detail

      • getConfig

        public DeviceConfig getConfig()
        Returns the current Device configuration of the YubiKey.
      • getSerialNumber

        @Nullable
        public java.lang.Integer getSerialNumber()
        Returns the serial number of the YubiKey, if available.

        The serial number can be read if the YubiKey has a serial number, and one of the YubiOTP slots is configured with the SERIAL_API_VISIBLE flag.

      • getVersion

        public com.yubico.yubikit.core.Version getVersion()
        Returns the version number of the YubiKey firmware.
      • getFormFactor

        public FormFactor getFormFactor()
        Returns the form factor of the YubiKey.
      • hasTransport

        public boolean hasTransport​(com.yubico.yubikit.core.Transport transport)
        Returns whether or not a specific transport is available on this YubiKey.
      • getSupportedCapabilities

        public int getSupportedCapabilities​(com.yubico.yubikit.core.Transport transport)
        Returns the supported (not necessarily enabled) capabilities for a given transport.
      • isLocked

        public boolean isLocked()
        Returns whether or not a Configuration Lock is set for the Management application on the YubiKey.
      • isFips

        public boolean isFips()
        Returns whether or not this is a FIPS compliant device
      • isSky

        public boolean isSky()
        Returns whether or not this is a Security key