|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.unboundid.directory.sdk.broker.types.AuthorizationCode
@NotExtensible @Mutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class AuthorizationCode
This class provides a data structure for working with OAuth2 temporary authorization codes.
Constructor Summary | |
---|---|
AuthorizationCode(java.lang.String username,
java.util.Set<java.lang.String> authorities,
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,
boolean offlineAccess)
Construct a new authorization code instance. |
Method Summary | |
---|---|
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. |
java.util.Set<java.lang.String> |
getAuthorities()
Retrieves the authorities of the resource owner. |
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 |
getUsername()
Retrieves the username 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. |
boolean |
isOfflineAccess()
Whether the client requested for offline access. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AuthorizationCode(java.lang.String username, java.util.Set<java.lang.String> authorities, 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, boolean offlineAccess)
username
- The username of the resource owner this authorization code
is associated with. Must not be null.authorities
- The authorities of the resource owner. 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.offlineAccess
- Whether the client requested offline access.Method Detail |
---|
public java.lang.String getUsername()
public java.util.Set<java.lang.String> getAuthorities()
public java.lang.String getApplicationId()
public java.util.Set<java.lang.String> getScopeIds()
public java.util.Date getGenerateTimestamp()
public long getMaxValiditySeconds()
public boolean isOfflineAccess()
true
if the client requested off offline access or
false
otherwise.public java.lang.String getState()
null
if it was not used.public java.lang.String getRedirectUri()
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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |