|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.unboundid.directory.sdk.broker.types.Token
com.unboundid.directory.sdk.broker.types.AccessToken
@NotExtensible @Mutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class AccessToken
This class provides a data structure for working with OAuth2 access tokens.
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class com.unboundid.directory.sdk.broker.types.Token |
---|
getApplicationId, getGenerateTimestamp, getMaxValiditySeconds, getScopeIds, getValue, isExpired, setValue, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
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.Method Detail |
---|
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()
hashCode
in class Token
public boolean equals(java.lang.Object o)
equals
in class Token
o
- The object for which to make the determination.
true
if the provided object is equal to this authorization
code, or false
if not.protected void toString(java.lang.StringBuilder buffer)
toString
in class Token
buffer
- The buffer to which the string representation should be
appended.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |