Enum Class OAuth2ClientType

java.lang.Object
java.lang.Enum<OAuth2ClientType>
io.jmix.email.authentication.OAuth2ClientType
All Implemented Interfaces:
EnumClass<String>, Serializable, Comparable<OAuth2ClientType>, Constable

public enum OAuth2ClientType extends Enum<OAuth2ClientType> implements EnumClass<String>
OAuth2 client type a refresh token was issued to. Some providers bind the refresh token to the client type: e.g. Microsoft Entra rejects redemption with a client secret for tokens obtained by a public client flow such as device code (error AADSTS700025), and vice versa. The type is stored together with the token so that redemption uses the matching client flavor.
  • Enum Constant Details

    • CONFIDENTIAL

      public static final OAuth2ClientType CONFIDENTIAL
      The token was issued to a confidential client (client secret was presented). Used by the authorization code flow and manual token updates.
    • PUBLIC

      public static final OAuth2ClientType PUBLIC
      The token was issued to a public client (no client secret). Used by the device code flow.
  • Method Details

    • values

      public static OAuth2ClientType[] 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 OAuth2ClientType 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
    • getId

      public String getId()
      Specified by:
      getId in interface EnumClass<String>
    • fromId

      public static @Nullable OAuth2ClientType fromId(String id)