public class OAuth2AuthorizedClient
extends java.lang.Object
A client is considered "authorized" when the End-User (Resource Owner) has granted authorization to the client to access it's protected resources.
This class associates the Client
to the Access Token
granted/authorized by the Resource Owner
.
ClientRegistration
,
OAuth2AccessToken
Constructor and Description |
---|
OAuth2AuthorizedClient(ClientRegistration clientRegistration,
java.lang.String principalName,
OAuth2AccessToken accessToken)
Constructs an
OAuth2AuthorizedClient using the provided parameters. |
Modifier and Type | Method and Description |
---|---|
OAuth2AccessToken |
getAccessToken()
Returns the
access token credential granted. |
ClientRegistration |
getClientRegistration()
Returns the authorized client's
registration . |
java.lang.String |
getPrincipalName()
Returns the End-User's
Principal name. |
public OAuth2AuthorizedClient(ClientRegistration clientRegistration, java.lang.String principalName, OAuth2AccessToken accessToken)
OAuth2AuthorizedClient
using the provided parameters.clientRegistration
- the authorized client's registrationprincipalName
- the name of the End-User Principal
(Resource Owner)accessToken
- the access token credential grantedpublic ClientRegistration getClientRegistration()
registration
.ClientRegistration
public java.lang.String getPrincipalName()
Principal
name.Principal
namepublic OAuth2AccessToken getAccessToken()
access token
credential granted.OAuth2AccessToken