Class OAuthToken
- java.lang.Object
- 
- com.ibm.websphere.security.oauth20.store.OAuthToken
 
- 
 public class OAuthToken extends java.lang.ObjectAn OAuth token implementation used for storing or retrieving entries from anOAuthStoreimplementation.
- 
- 
Constructor SummaryConstructors Constructor Description OAuthToken(java.lang.String lookupKey, java.lang.String uniqueId, java.lang.String providerId, java.lang.String type, java.lang.String subType, long createdAt, int lifetimeInSeconds, long expires, java.lang.String tokenString, java.lang.String clientId, java.lang.String username, java.lang.String scope, java.lang.String redirectUri, java.lang.String stateId, java.lang.String tokenProperties)Constructs a newOAuthTokendata transfer object.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.StringgetClientId()Gets the client id.longgetCreatedAt()Gets the time the token was created at.longgetExpires()Gets the time the token expires.intgetLifetimeInSeconds()Gets the token lifetime.java.lang.StringgetLookupKey()Gets the lookup key.java.lang.StringgetProviderId()Gets the OAuth provider id.java.lang.StringgetRedirectUri()Gets the redirect URI.java.lang.StringgetScope()Gets the token scope.java.lang.StringgetStateId()Gets the state id.java.lang.StringgetSubType()Gets the token sub type.java.lang.StringgetTokenProperties()Gets the token extension properties as a JSON string.java.lang.StringgetTokenString()Gets the encoded token string.java.lang.StringgetType()Gets the token type.java.lang.StringgetUniqueId()Gets the unique id.java.lang.StringgetUsername()Gets the user name.inthashCode()
 
- 
- 
- 
Constructor Detail- 
OAuthTokenpublic OAuthToken(java.lang.String lookupKey, java.lang.String uniqueId, java.lang.String providerId, java.lang.String type, java.lang.String subType, long createdAt, int lifetimeInSeconds, long expires, java.lang.String tokenString, java.lang.String clientId, java.lang.String username, java.lang.String scope, java.lang.String redirectUri, java.lang.String stateId, java.lang.String tokenProperties)Constructs a newOAuthTokendata transfer object.
 
- 
 - 
Method Detail- 
getLookupKeypublic java.lang.String getLookupKey() Gets the lookup key.- Returns:
- the lookup key to be used to store the entry in the OAuthStore
 
 - 
getUniqueIdpublic java.lang.String getUniqueId() Gets the unique id.- Returns:
- the unique id
 
 - 
getProviderIdpublic java.lang.String getProviderId() Gets the OAuth provider id. This id can be used in combination with the lookup key to store the tokens per OAuth provider.- Returns:
- the id of the OAuth provider that issued the token
 
 - 
getTypepublic java.lang.String getType() Gets the token type.- Returns:
- the token type, "AUTHORIZATION_GRANT" or "ACCESS_TOKEN" for example
 
 - 
getSubTypepublic java.lang.String getSubType() Gets the token sub type.- Returns:
- the authorization grant type or access token type, "Code" or "Bearer" for example
 
 - 
getCreatedAtpublic long getCreatedAt() Gets the time the token was created at.- Returns:
- the timestamp in milliseconds since the epoch when this token was created
 
 - 
getLifetimeInSecondspublic int getLifetimeInSeconds() Gets the token lifetime.- Returns:
- the lifetime in seconds of this token
 
 - 
getExpirespublic long getExpires() Gets the time the token expires.- Returns:
- the timestamp in milliseconds since the epoch when this token expires
 
 - 
getTokenStringpublic java.lang.String getTokenString() Gets the encoded token string.- Returns:
- the token string
 
 - 
getClientIdpublic java.lang.String getClientId() Gets the client id.- Returns:
- the id of the client the token was issued to
 
 - 
getUsernamepublic java.lang.String getUsername() Gets the user name.- Returns:
- the user the token was issued for
 
 - 
getScopepublic java.lang.String getScope() Gets the token scope.- Returns:
- the scope values that this token was approved for
 
 - 
getRedirectUripublic java.lang.String getRedirectUri() Gets the redirect URI.- Returns:
- the redirect URI
 
 - 
getStateIdpublic java.lang.String getStateId() Gets the state id.- Returns:
- the state id
 
 - 
getTokenPropertiespublic java.lang.String getTokenProperties() Gets the token extension properties as a JSON string.- Returns:
- the JSON string with the token extension properties
 
 - 
equalspublic boolean equals(java.lang.Object obj) - Overrides:
- equalsin class- java.lang.Object
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- java.lang.Object
 
 
- 
 
-