@NotExtensible @Mutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class AuthorizationCode extends java.lang.Object
Constructor and Description |
---|
AuthorizationCode(java.lang.String userId,
java.lang.String applicationId,
java.lang.String redirectUri,
java.util.Date generateTimestamp,
long maxValiditySeconds,
java.util.Set<java.lang.String> scopeIds,
java.lang.String state,
long authTime)
Construct a new authorization code instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Indicates whether the provided object is equal to this authorization code.
|
java.lang.String |
getApplicationId()
Retrieves the application ID with which this authorization code is
associated.
|
long |
getAuthTime()
Retrieves the time that the user authenticated with the server.
|
java.util.Date |
getGenerateTimestamp()
Retrieves the time that this authorization code was generated.
|
long |
getMaxValiditySeconds()
Retrieves the maximum length of time in seconds that this code will be
considered valid.
|
java.lang.String |
getRedirectUri()
Returns the endpoint to redirect the resource owner's user-agent back to
the application.
|
java.util.Set<java.lang.String> |
getScopeIds()
Retrieves the set of scope IDs for which the client has been authorized.
|
java.lang.String |
getState()
Retrieves the opaque value used by the client to maintain state between
the request and callback.
|
java.lang.String |
getUserId()
Retrieves the user ID of the resource owner this authorization code is
associated with.
|
java.lang.String |
getValue()
Retrieves the string value of this authorization code that should be
returned to the client.
|
int |
hashCode()
Retrieves a hash code for this authorization code.
|
boolean |
isExpired()
Indicates whether this authorization code is expired.
|
void |
setValue(java.lang.String value)
Sets the string value of this authorization code that should be returned
to the client.
|
java.lang.String |
toString()
Retrieves a string representation of this authorization code.
|
public AuthorizationCode(java.lang.String userId, java.lang.String applicationId, java.lang.String redirectUri, java.util.Date generateTimestamp, long maxValiditySeconds, java.util.Set<java.lang.String> scopeIds, java.lang.String state, long authTime)
userId
- The user ID of the resource owner this authorization code
is associated with. Must not be null.applicationId
- The application ID with which this token is
associated. Must not be null.redirectUri
- the endpoint to redirect the resource owner's user-agent
back to the application. 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.scopeIds
- The set of scopes for which the client has been authorized.
Must not be null.state
- The opaque value used by the client to maintain state between
the request and callback.authTime
- The time at which the resource owner was authenticated with
the Identity Broker, in milliseconds since 1/1/70 12:00 AM.public java.lang.String getUserId()
public java.lang.String getApplicationId()
public java.util.Set<java.lang.String> getScopeIds()
public java.util.Date getGenerateTimestamp()
public long getMaxValiditySeconds()
public java.lang.String getState()
null
if it was not used.public java.lang.String getRedirectUri()
public long getAuthTime()
public java.lang.String getValue()
public void setValue(java.lang.String value)
value
- The string value of this authorization code that should be
returned to the client.public boolean isExpired()
true
if this authorization code 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