public class OAuth2AuthenticationContext extends java.lang.Object implements Context
Authentication and (optionally) additional information.Context| Modifier and Type | Class and Description |
|---|---|
protected static class |
OAuth2AuthenticationContext.AbstractBuilder<T extends OAuth2AuthenticationContext,B extends OAuth2AuthenticationContext.AbstractBuilder<T,B>>
A builder for subclasses of
OAuth2AuthenticationContext. |
| Constructor and Description |
|---|
OAuth2AuthenticationContext(org.springframework.security.core.Authentication authentication,
java.util.Map<java.lang.Object,java.lang.Object> context)
Constructs an
OAuth2AuthenticationContext using the provided parameters. |
OAuth2AuthenticationContext(java.util.Map<java.lang.Object,java.lang.Object> context)
Constructs an
OAuth2AuthenticationContext using the provided parameters. |
| Modifier and Type | Method and Description |
|---|---|
<V> V |
get(java.lang.Object key)
Returns the value of the attribute associated to the key.
|
<T extends org.springframework.security.core.Authentication> |
getAuthentication()
Returns the
Authentication associated to the context. |
boolean |
hasKey(java.lang.Object key)
Returns
true if an attribute associated to the key exists, false otherwise. |
public OAuth2AuthenticationContext(org.springframework.security.core.Authentication authentication,
@Nullable
java.util.Map<java.lang.Object,java.lang.Object> context)
OAuth2AuthenticationContext using the provided parameters.authentication - the Authenticationcontext - a Map of additional context informationpublic OAuth2AuthenticationContext(java.util.Map<java.lang.Object,java.lang.Object> context)
OAuth2AuthenticationContext using the provided parameters.context - a Map of context information, must contain the Authenticationpublic <T extends org.springframework.security.core.Authentication> T getAuthentication()
Authentication associated to the context.T - the type of the AuthenticationAuthentication@Nullable public <V> V get(java.lang.Object key)
Contextpublic boolean hasKey(java.lang.Object key)
Contexttrue if an attribute associated to the key exists, false otherwise.