Class OAuth2AccessTokenAuthenticationContext
java.lang.Object
org.springframework.security.oauth2.server.authorization.authentication.OAuth2AccessTokenAuthenticationContext
- All Implemented Interfaces:
OAuth2AuthenticationContext
,Context
public final class OAuth2AccessTokenAuthenticationContext
extends Object
implements OAuth2AuthenticationContext
An
OAuth2AuthenticationContext
that holds an
OAuth2AccessTokenAuthenticationToken
and additional information and is used
when customizing the OAuth2AccessTokenResponse
.- Since:
- 1.3
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
A builder forOAuth2AccessTokenAuthenticationContext
.Nested classes/interfaces inherited from interface org.springframework.security.oauth2.server.authorization.authentication.OAuth2AuthenticationContext
OAuth2AuthenticationContext.AbstractBuilder<T extends OAuth2AuthenticationContext,
B extends OAuth2AuthenticationContext.AbstractBuilder<T, B>> -
Method Summary
Modifier and TypeMethodDescription<V> V
Returns the value of the attribute associated to the key.org.springframework.security.oauth2.core.endpoint.OAuth2AccessTokenResponse.Builder
Returns theaccess token response builder
.boolean
Returnstrue
if an attribute associated to the key exists,false
otherwise.with
(OAuth2AccessTokenAuthenticationToken authentication) Constructs a newOAuth2AccessTokenAuthenticationContext.Builder
with the providedOAuth2AccessTokenAuthenticationToken
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.security.oauth2.server.authorization.context.Context
get
Methods inherited from interface org.springframework.security.oauth2.server.authorization.authentication.OAuth2AuthenticationContext
getAuthentication
-
Method Details
-
get
Description copied from interface:Context
Returns the value of the attribute associated to the key. -
hasKey
Description copied from interface:Context
Returnstrue
if an attribute associated to the key exists,false
otherwise. -
getAccessTokenResponse
public org.springframework.security.oauth2.core.endpoint.OAuth2AccessTokenResponse.Builder getAccessTokenResponse()Returns theaccess token response builder
.- Returns:
- the
OAuth2AccessTokenResponse.Builder
-
with
public static OAuth2AccessTokenAuthenticationContext.Builder with(OAuth2AccessTokenAuthenticationToken authentication) Constructs a newOAuth2AccessTokenAuthenticationContext.Builder
with the providedOAuth2AccessTokenAuthenticationToken
.- Parameters:
authentication
- theOAuth2AccessTokenAuthenticationToken
- Returns:
- the
OAuth2AccessTokenAuthenticationContext.Builder
-