@NotExtensible @Mutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class AccessToken extends Token
Constructor and Description |
---|
AccessToken(java.lang.String userId,
java.lang.String applicationId,
java.util.Date generateTimestamp,
long maxValiditySeconds,
java.util.Set<java.lang.String> scopeIds)
Construct a new access token instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Indicates whether the provided object is equal to this access token.
|
RefreshToken |
getRefreshToken()
Retrieves the refresh token associated with this access token.
|
java.lang.String |
getUserId()
Retrieves the user ID of the resource owner this access token is
associated with.
|
int |
hashCode()
Retrieves a hash code for this access token.
|
void |
setRefreshToken(RefreshToken refreshToken)
Sets the refresh token associated with this access token.
|
protected void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this access token to the provided
buffer.
|
getApplicationId, getGenerateTimestamp, getMaxValiditySeconds, getScopeIds, getValue, isExpired, setValue, toString
public AccessToken(java.lang.String userId, java.lang.String applicationId, java.util.Date generateTimestamp, long maxValiditySeconds, java.util.Set<java.lang.String> scopeIds)
userId
- The user ID of the resource owner this access token is
associated with or the application ID if resource owner
authentication was not performed.applicationId
- The application ID with which this token is
associated. Must not be null.generateTimestamp
- The time that this token was generated. Must not
be null.maxValiditySeconds
- The maximum length of time in seconds that this
token will be considered valid. Must not be null
and must not be negative.scopeIds
- The set of scopes for which the client has been authorized.
Must not be null.public java.lang.String getUserId()
public RefreshToken getRefreshToken()
null
if there is no associated refresh token.public void setRefreshToken(RefreshToken refreshToken)
refreshToken
- The refresh token associated with this access token.public int hashCode()
public boolean equals(java.lang.Object o)