Class Credential

java.lang.Object
com.yubico.yubikit.oath.Credential
All Implemented Interfaces:
Serializable

public class Credential extends Object implements Serializable
A reference to an OATH Credential stored on a YubiKey.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    Returns the name of the account (typically a username or email address).
    byte[]
    Returns the ID of a Credential which is used to identify it to the YubiKey.
    @Nullable String
    Returns the name of the Credential issuer (e.g.
    Returns the OATH type (HOTP or TOTP) of the Credential.
    int
    Returns the validity time period in seconds for a Code generated from this Credential.
    int
     
    boolean
    Returns whether or not a user presence check (a physical touch on the sensor of the YubiKey) is required for calculating a Code from this Credential.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getId

      public byte[] getId()
      Returns the ID of a Credential which is used to identify it to the YubiKey.
    • getOathType

      public OathType getOathType()
      Returns the OATH type (HOTP or TOTP) of the Credential.
    • getIssuer

      public @Nullable String getIssuer()
      Returns the name of the Credential issuer (e.g. Google, Amazon, Facebook, etc.)
    • getAccountName

      public String getAccountName()
      Returns the name of the account (typically a username or email address).
    • getPeriod

      public int getPeriod()
      Returns the validity time period in seconds for a Code generated from this Credential.
    • isTouchRequired

      public boolean isTouchRequired()
      Returns whether or not a user presence check (a physical touch on the sensor of the YubiKey) is required for calculating a Code from this Credential.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object