public class TokenInfo extends Object implements Serializable
"urn:ietf:params:oauth:token-type:access_token" or the type
"urn:ietf:params:oauth:token-type:refresh_token".
This class is used to hold detailed information about a subject token
or an actor token. See the descriptions of
TokenResponse.getSubjectTokenInfo() and
TokenResponse.getActorTokenInfo() for details.
TokenResponse.getSubjectTokenInfo(),
TokenResponse.getActorTokenInfo(),
RFC 8693 OAuth 2.0 Token Exchange,
Serialized Form| Constructor and Description |
|---|
TokenInfo() |
| Modifier and Type | Method and Description |
|---|---|
AuthzDetails |
getAuthorizationDetails()
Get the authorization details associated with the token.
|
long |
getClientId()
Get the client ID.
|
String |
getClientIdAlias()
Get the alias of the client ID.
|
long |
getExpiresAt()
Get the expiration date/time in seconds since the Unix epoch.
|
Property[] |
getProperties()
Get the extra properties associated with the token.
|
URI[] |
getResources()
Get the resources associated with the token.
|
Scope[] |
getScopes()
Get the scopes.
|
String |
getSubject()
Get the subject (= resource owner's unique identifier).
|
boolean |
isClientIdAliasUsed()
Get the flag indicating whether the alias of the client ID was used
when the token was created.
|
TokenInfo |
setAuthorizationDetails(AuthzDetails details)
Set the authorization details associated with the token.
|
TokenInfo |
setClientId(long clientId)
Set the client ID.
|
TokenInfo |
setClientIdAlias(String alias)
Set the alias of the client ID.
|
TokenInfo |
setClientIdAliasUsed(boolean used)
Set the flag indicating whether the alias of the client ID was used
when the token was created.
|
TokenInfo |
setExpiresAt(long expiresAt)
Set the expiration date/time in seconds since the Unix epoch.
|
TokenInfo |
setProperties(Property[] properties)
Set the extra properties associated with the token.
|
TokenInfo |
setResources(URI[] resources)
Set the resources associated with the token.
|
TokenInfo |
setScopes(Scope[] scopes)
Set the scopes.
|
TokenInfo |
setSubject(String subject)
Set the subject (= resource owner's unique identifier).
|
public long getClientId()
public TokenInfo setClientId(long clientId)
clientId - The client ID.this instance.public String getSubject()
public TokenInfo setSubject(String subject)
subject - The subject.this instance.public Scope[] getScopes()
public TokenInfo setScopes(Scope[] scopes)
scopes - The scopes.this instance.public long getExpiresAt()
public TokenInfo setExpiresAt(long expiresAt)
expiresAt - The expiration date/time.this instance.public Property[] getProperties()
public TokenInfo setProperties(Property[] properties)
properties - The extra properties.this instance.public String getClientIdAlias()
public TokenInfo setClientIdAlias(String alias)
alias - The alias of the client ID.this instance.public boolean isClientIdAliasUsed()
true if the alias of the client ID was used.public TokenInfo setClientIdAliasUsed(boolean used)
used - true to indicate that the alias of the client ID was
used.this instance.public URI[] getResources()
The values are ones specified by the resource request parameters.
public TokenInfo setResources(URI[] resources)
The values are ones specified by the resource request parameters.
resources - The resources.this instance.public AuthzDetails getAuthorizationDetails()
The value is one specified by the authorization_details request
parameter.
public TokenInfo setAuthorizationDetails(AuthzDetails details)
The value is one specified by the authorization_details request
parameter.
details - The authorization details.this instance.Copyright © 2022. All rights reserved.