java.lang.Object
org.springframework.security.oauth2.server.authorization.settings.OAuth2TokenFormat
All Implemented Interfaces:
Serializable

public final class OAuth2TokenFormat extends Object implements Serializable
Standard data formats for OAuth 2.0 Tokens.
Since:
0.2.3
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final OAuth2TokenFormat
    Reference (opaque) tokens are unique identifiers that serve as a reference to the token metadata and claims of the user and/or client, stored at the provider.
    static final OAuth2TokenFormat
    Self-contained tokens use a protected, time-limited data structure that contains token metadata and claims of the user and/or client.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs an OAuth2TokenFormat using the provided value.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    Returns the value of the token format.
    int
     

    Methods inherited from class java.lang.Object

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

    • SELF_CONTAINED

      public static final OAuth2TokenFormat SELF_CONTAINED
      Self-contained tokens use a protected, time-limited data structure that contains token metadata and claims of the user and/or client. JSON Web Token (JWT) is a widely used format.
    • REFERENCE

      public static final OAuth2TokenFormat REFERENCE
      Reference (opaque) tokens are unique identifiers that serve as a reference to the token metadata and claims of the user and/or client, stored at the provider.
  • Constructor Details

    • OAuth2TokenFormat

      public OAuth2TokenFormat(String value)
      Constructs an OAuth2TokenFormat using the provided value.
      Parameters:
      value - the value of the token format
  • Method Details

    • getValue

      public String getValue()
      Returns the value of the token format.
      Returns:
      the value of the token format
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object