Class OAuth2AuthorizationCodeRequestAuthenticationContext
java.lang.Object
org.springframework.security.oauth2.server.authorization.authentication.OAuth2AuthorizationCodeRequestAuthenticationContext
- All Implemented Interfaces:
OAuth2AuthenticationContext,Context
public final class OAuth2AuthorizationCodeRequestAuthenticationContext
extends Object
implements OAuth2AuthenticationContext
An
OAuth2AuthenticationContext that holds an
OAuth2AuthorizationCodeRequestAuthenticationToken and additional information
and is used when validating the OAuth 2.0 Authorization Request parameters, as well as,
determining if authorization consent is required.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA builder forOAuth2AuthorizationCodeRequestAuthenticationContext.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> VReturns the value of the attribute associated to the key.Returns theauthorization consent.org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequestReturns theauthorization request.Returns theregistered client.booleanReturnstrueif an attribute associated to the key exists,falseotherwise.with(OAuth2AuthorizationCodeRequestAuthenticationToken authentication) Constructs a newOAuth2AuthorizationCodeRequestAuthenticationContext.Builderwith the providedOAuth2AuthorizationCodeRequestAuthenticationToken.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.security.oauth2.server.authorization.context.Context
getMethods inherited from interface org.springframework.security.oauth2.server.authorization.authentication.OAuth2AuthenticationContext
getAuthentication
-
Method Details
-
get
Description copied from interface:ContextReturns the value of the attribute associated to the key. -
hasKey
Description copied from interface:ContextReturnstrueif an attribute associated to the key exists,falseotherwise. -
getRegisteredClient
Returns theregistered client.- Returns:
- the
RegisteredClient
-
getAuthorizationRequest
@Nullable public org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest getAuthorizationRequest()Returns theauthorization request.- Returns:
- the
OAuth2AuthorizationRequest - Since:
- 1.3
-
getAuthorizationConsent
Returns theauthorization consent.- Returns:
- the
OAuth2AuthorizationConsent - Since:
- 1.3
-
with
public static OAuth2AuthorizationCodeRequestAuthenticationContext.Builder with(OAuth2AuthorizationCodeRequestAuthenticationToken authentication) Constructs a newOAuth2AuthorizationCodeRequestAuthenticationContext.Builderwith the providedOAuth2AuthorizationCodeRequestAuthenticationToken.- Parameters:
authentication- theOAuth2AuthorizationCodeRequestAuthenticationToken- Returns:
- the
OAuth2AuthorizationCodeRequestAuthenticationContext.Builder
-