|
|||||||||
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
public abstract class Token
Abstract class for an OAuth 2 token.
Constructor Summary | |
---|---|
protected |
Token(java.lang.String applicationId,
java.util.Date generateTimestamp,
long maxValiditySeconds)
Construct a new Token instance. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o)
Indicates whether the provided object is equal to this token. |
java.lang.String |
getApplicationId()
Retrieves the application ID with which this token is associated. |
java.util.Date |
getGenerateTimestamp()
Retrieves the time that this token was generated. |
long |
getMaxValiditySeconds()
Retrieves the maximum length of time in seconds that this code will be considered valid. |
java.lang.String |
getValue()
Retrieves the string value of this token that should be returned to the client. |
int |
hashCode()
Retrieves a hash code for this token. |
boolean |
isExpired()
Indicates whether this token is expired. |
void |
setValue(java.lang.String value)
Sets the string value of this token that should be returned to the client. |
java.lang.String |
toString()
Retrieves a string representation of this token. |
protected abstract void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this token to the provided buffer. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected Token(java.lang.String applicationId, java.util.Date generateTimestamp, long maxValiditySeconds)
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.Method Detail |
---|
public java.lang.String getApplicationId()
public java.util.Date getGenerateTimestamp()
public long getMaxValiditySeconds()
public java.lang.String getValue()
public void setValue(java.lang.String value)
value
- The string value of this token that should be returned
to the client.public boolean isExpired()
true
if this token is expired, or
false
if not.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- The object for which to make the determination.
true
if the provided object is equal to this authorization
code, or false
if not.public java.lang.String toString()
toString
in class java.lang.Object
protected abstract void toString(java.lang.StringBuilder buffer)
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 |