public class OAuth2Authorization extends Object implements Serializable
client
by the resource owner
.RegisteredClient
, OAuth2AccessToken
, Serialized FormModifier and Type | Class and Description |
---|---|
static class | OAuth2Authorization.Builder A builder for OAuth2Authorization . |
Modifier | Constructor and Description |
---|---|
protected | OAuth2Authorization() |
Modifier and Type | Method and Description |
---|---|
boolean | equals(Object obj) |
static OAuth2Authorization.Builder | from(OAuth2Authorization authorization) Returns a new OAuth2Authorization.Builder , initialized with the values from the provided authorization . |
OAuth2AccessToken | getAccessToken() Returns the access token credential. |
<T> T | getAttribute(String name) Returns the value of an attribute associated to the authorization. |
Map<String,Object> | getAttributes() Returns the attribute(s) associated to the authorization. |
String | getPrincipalName() Returns the resource owner's Principal name. |
String | getRegisteredClientId() Returns the identifier for the registered client . |
int | hashCode() |
static OAuth2Authorization.Builder | withRegisteredClient(RegisteredClient registeredClient) Returns a new OAuth2Authorization.Builder , initialized with the provided RegisteredClient.getId() . |
public String getRegisteredClientId()
registered client
.RegisteredClient.getId()
public String getPrincipalName()
Principal
name.Principal
namepublic OAuth2AccessToken getAccessToken()
access token
credential.OAuth2AccessToken
public Map<String,Object> getAttributes()
Map
of the attribute(s)public <T> T getAttribute(String name)
T
- the type of the attributename
- the name of the attributenull
if not availablepublic static OAuth2Authorization.Builder withRegisteredClient(RegisteredClient registeredClient)
OAuth2Authorization.Builder
, initialized with the provided RegisteredClient.getId()
.registeredClient
- the RegisteredClient
OAuth2Authorization.Builder
public static OAuth2Authorization.Builder from(OAuth2Authorization authorization)
OAuth2Authorization.Builder
, initialized with the values from the provided authorization
.authorization
- the authorization used for initializing the OAuth2Authorization.Builder
OAuth2Authorization.Builder