Enum Class UserKey

java.lang.Object
java.lang.Enum<UserKey>
dev.getelements.elements.sdk.model.auth.UserKey
All Implemented Interfaces:
Serializable, Comparable<UserKey>, Constable

public enum UserKey extends Enum<UserKey>
Enumerates the user keys. This is used in conjunction with the PrivateClaim.USER_KEY and represents all valid values for that claim.
  • Enum Constant Details

    • NAME

      public static final UserKey NAME
      The user's name. Maps to User.getName().
    • EMAIL

      public static final UserKey EMAIL
      The user email. Maps to User.getEmail().
    • EXTERNAL_USER_ID

      public static final UserKey EXTERNAL_USER_ID
      Deprecated.
      no longer in use.
      The user's external user id.
  • Method Details

    • values

      public static UserKey[] 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 UserKey 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
    • getValue

      public String getValue()
      The literal value of the claim.
      Returns:
      the value
    • findByValue

      public static Optional<UserKey> findByValue(String value)
      Finds the UserKey by the specified value.
      Parameters:
      value - the value
      Returns:
      the value