public class AccessToken extends Object implements Serializable
| Constructor and Description |
|---|
AccessToken() |
| Modifier and Type | Method and Description |
|---|---|
long |
getAccessTokenExpiresAt()
Get the timestamp at which the access token will expire.
|
String |
getAccessTokenHash()
Get the hash of the access token.
|
long |
getClientId()
Get the ID of the client associated with the access token.
|
long |
getCreatedAt()
Get the timestamp at which the access token was first created.
|
GrantType |
getGrantType()
Get the grant type of the access token when the access token was created.
|
long |
getLastRefreshedAt()
Get the timestamp at which the access token was last refreshed using the
refresh token.
|
Property[] |
getProperties()
Get the properties associated with the access token.
|
long |
getRefreshTokenExpiresAt()
Get the timestamp at which the refresh token will expire.
|
String |
getRefreshTokenHash()
Get the hash of the refresh token.
|
String[] |
getScopes()
Get the scopes associated with the access token.
|
String |
getSubject()
Get the subject (= unique user ID) associated with the access token.
|
AccessToken |
setAccessTokenExpiresAt(long expiresAt)
Set the timestamp at which the access token will expire.
|
AccessToken |
setAccessTokenHash(String hash)
Set the hash of the access token.
|
AccessToken |
setClientId(long clientId)
Set the ID of the client associated with the access token.
|
AccessToken |
setCreatedAt(long createdAt)
Set the timestamp at which the access token was first created.
|
AccessToken |
setGrantType(GrantType grantType)
Set the grant type of the access token when the access token was created.
|
AccessToken |
setLastRefreshedAt(long lastRefreshedAt)
Set the timestamp at which the access token was last refreshed using the
refresh token.
|
AccessToken |
setProperties(Property[] properties)
Set the properties associated with the access token.
|
AccessToken |
setRefreshTokenExpiresAt(long expiresAt)
Set the timestamp at which the refresh token will expire.
|
AccessToken |
setRefreshTokenHash(String hash)
Set the hash of the refresh token.
|
AccessToken |
setScopes(String[] scopes)
Set the scopes associated with the access token.
|
AccessToken |
setSubject(String subject)
Set the subject (= unique user ID) associated with the access token.
|
public String getAccessTokenHash()
public AccessToken setAccessTokenHash(String hash)
hash - The hash of the access token.this object.public String getRefreshTokenHash()
null may be returned.null.public AccessToken setRefreshTokenHash(String hash)
hash - The hash of the refresh token.this object.public long getClientId()
public AccessToken setClientId(long clientId)
clientId - The ID of the client associated with the access token.this object.public String getSubject()
null is returned if the access token was created using the
Client Credentials
flow.null if the access token was created using the
Client Credentials
flow.public AccessToken setSubject(String subject)
subject - The subject (= unique user ID) associated with the access token.this object.public GrantType getGrantType()
public AccessToken setGrantType(GrantType grantType)
grantType - The grant type of the access token when the access token was created.this object.public String[] getScopes()
public AccessToken setScopes(String[] scopes)
scopes - The scopes associated with the access token.this object.public long getAccessTokenExpiresAt()
public AccessToken setAccessTokenExpiresAt(long expiresAt)
expiresAt - The expiration timestamp in milliseconds since the Unix epoch (1970-01-01).this object.public long getRefreshTokenExpiresAt()
0 is
returned if getRefreshTokenHash() returns null.public AccessToken setRefreshTokenExpiresAt(long expiresAt)
expiresAt - The expiration timestamp in milliseconds since the Unix epoch (1970-01-01).this object.public long getCreatedAt()
public AccessToken setCreatedAt(long createdAt)
createdAt - The timestamp at which the access token was first created in
milliseconds since the Unix epoch (1970-01-01).this object.public long getLastRefreshedAt()
0 is returned if it has never been refreshed.0 is returned if it has never been refreshed.public AccessToken setLastRefreshedAt(long lastRefreshedAt)
lastRefreshedAt - The timestamp at which the access token was last refreshed using
the refreshed token in milliseconds since the Unix epoch (1970-01-01).this object.public Property[] getProperties()
public AccessToken setProperties(Property[] properties)
properties - The properties associated with the access token.this object.Copyright © 2019. All rights reserved.