Class DefaultOAuth2TokenContext

java.lang.Object
org.springframework.security.oauth2.server.authorization.token.DefaultOAuth2TokenContext
All Implemented Interfaces:
Context, OAuth2TokenContext

public final class DefaultOAuth2TokenContext extends Object implements OAuth2TokenContext
Default implementation of OAuth2TokenContext.
Since:
0.2.3
See Also:
  • Method Details

    • get

      @Nullable public <V> V get(Object key)
      Description copied from interface: Context
      Returns the value of the attribute associated to the key.
      Specified by:
      get in interface Context
      Type Parameters:
      V - the type of the value for the attribute
      Parameters:
      key - the key for the attribute
      Returns:
      the value of the attribute associated to the key, or null if not available
    • hasKey

      public boolean hasKey(Object key)
      Description copied from interface: Context
      Returns true if an attribute associated to the key exists, false otherwise.
      Specified by:
      hasKey in interface Context
      Parameters:
      key - the key for the attribute
      Returns:
      true if an attribute associated to the key exists, false otherwise
    • builder

      public static DefaultOAuth2TokenContext.Builder builder()
      Returns:
      the DefaultOAuth2TokenContext.Builder