public static class OAuth2Authorization.Builder extends Object implements Serializable
OAuth2Authorization
.Modifier | Constructor and Description |
---|---|
protected | Builder(String registeredClientId) |
Modifier and Type | Method and Description |
---|---|
OAuth2Authorization.Builder | accessToken(OAuth2AccessToken accessToken) Sets the access token credential. |
OAuth2Authorization.Builder | attribute(String name, Object value) Adds an attribute associated to the authorization. |
OAuth2Authorization.Builder | attributes(Consumer<Map<String,Object>> attributesConsumer) A Consumer of the attributes Map allowing the ability to add, replace, or remove. |
OAuth2Authorization | build() Builds a new OAuth2Authorization . |
OAuth2Authorization.Builder | principalName(String principalName) Sets the resource owner's Principal name. |
protected Builder(String registeredClientId)
public OAuth2Authorization.Builder principalName(String principalName)
Principal
name.principalName
- the resource owner's Principal
nameOAuth2Authorization.Builder
public OAuth2Authorization.Builder accessToken(OAuth2AccessToken accessToken)
access token
credential.accessToken
- the OAuth2AccessToken
OAuth2Authorization.Builder
public OAuth2Authorization.Builder attribute(String name, Object value)
name
- the name of the attributevalue
- the value of the attributeOAuth2Authorization.Builder
public OAuth2Authorization.Builder attributes(Consumer<Map<String,Object>> attributesConsumer)
Consumer
of the attributes Map
allowing the ability to add, replace, or remove.attributesConsumer
- a Consumer
of the attributes Map
OAuth2Authorization.Builder
public OAuth2Authorization build()
OAuth2Authorization
.OAuth2Authorization