Class OAuth2AuthorizationConsentAuthenticationContext
java.lang.Object
org.springframework.security.oauth2.server.authorization.authentication.OAuth2AuthorizationConsentAuthenticationContext
- All Implemented Interfaces:
OAuth2AuthenticationContext
,Context
public final class OAuth2AuthorizationConsentAuthenticationContext
extends Object
implements OAuth2AuthenticationContext
An
OAuth2AuthenticationContext
that holds an
OAuth2AuthorizationConsent.Builder
and additional information and is used when
customizing the building of the OAuth2AuthorizationConsent
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
A builder forOAuth2AuthorizationConsentAuthenticationContext
.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.Returns theauthorization
.Returns theauthorization consent builder
.org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest
Returns theauthorization request
.Returns theregistered client
.boolean
Returnstrue
if an attribute associated to the key exists,false
otherwise.with
(OAuth2AuthorizationConsentAuthenticationToken authentication) Constructs a newOAuth2AuthorizationConsentAuthenticationContext.Builder
with the providedOAuth2AuthorizationConsentAuthenticationToken
.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. -
getAuthorizationConsent
Returns theauthorization consent builder
.- Returns:
- the
OAuth2AuthorizationConsent.Builder
-
getRegisteredClient
Returns theregistered client
.- Returns:
- the
RegisteredClient
-
getAuthorization
Returns theauthorization
.- Returns:
- the
OAuth2Authorization
-
getAuthorizationRequest
public org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest getAuthorizationRequest()Returns theauthorization request
.- Returns:
- the
OAuth2AuthorizationRequest
-
with
public static OAuth2AuthorizationConsentAuthenticationContext.Builder with(OAuth2AuthorizationConsentAuthenticationToken authentication) Constructs a newOAuth2AuthorizationConsentAuthenticationContext.Builder
with the providedOAuth2AuthorizationConsentAuthenticationToken
.- Parameters:
authentication
- theOAuth2AuthorizationConsentAuthenticationToken
- Returns:
- the
OAuth2AuthorizationConsentAuthenticationContext.Builder
-