Class OAuth2ClientCredentialsAuthenticationContext
java.lang.Object
org.springframework.security.oauth2.server.authorization.authentication.OAuth2ClientCredentialsAuthenticationContext
- All Implemented Interfaces:
OAuth2AuthenticationContext
,Context
public final class OAuth2ClientCredentialsAuthenticationContext
extends Object
implements OAuth2AuthenticationContext
An
OAuth2AuthenticationContext
that holds an
OAuth2ClientCredentialsAuthenticationToken
and additional information and is
used when validating the OAuth 2.0 Client Credentials Grant Request.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
A builder forOAuth2ClientCredentialsAuthenticationContext
.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 theregistered client
.boolean
Returnstrue
if an attribute associated to the key exists,false
otherwise.with
(OAuth2ClientCredentialsAuthenticationToken authentication) Constructs a newOAuth2ClientCredentialsAuthenticationContext.Builder
with the providedOAuth2ClientCredentialsAuthenticationToken
.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. -
getRegisteredClient
Returns theregistered client
.- Returns:
- the
RegisteredClient
-
with
public static OAuth2ClientCredentialsAuthenticationContext.Builder with(OAuth2ClientCredentialsAuthenticationToken authentication) Constructs a newOAuth2ClientCredentialsAuthenticationContext.Builder
with the providedOAuth2ClientCredentialsAuthenticationToken
.- Parameters:
authentication
- theOAuth2ClientCredentialsAuthenticationToken
- Returns:
- the
OAuth2ClientCredentialsAuthenticationContext.Builder
-