Class OAuthToken
java.lang.Object
com.ibm.websphere.security.oauth20.store.OAuthToken
An OAuth token implementation used for storing or retrieving entries from an
OAuthStore
implementation.-
Constructor Summary
ConstructorDescriptionOAuthToken
(String lookupKey, String uniqueId, String providerId, String type, String subType, long createdAt, int lifetimeInSeconds, long expires, String tokenString, String clientId, String username, String scope, String redirectUri, String stateId, String tokenProperties) Constructs a newOAuthToken
data transfer object. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Gets the client id.long
Gets the time the token was created at.long
Gets the time the token expires.int
Gets the token lifetime.Gets the lookup key.Gets the OAuth provider id.Gets the redirect URI.getScope()
Gets the token scope.Gets the state id.Gets the token sub type.Gets the token extension properties as a JSON string.Gets the encoded token string.getType()
Gets the token type.Gets the unique id.Gets the user name.int
hashCode()
-
Constructor Details
-
OAuthToken
public OAuthToken(String lookupKey, String uniqueId, String providerId, String type, String subType, long createdAt, int lifetimeInSeconds, long expires, String tokenString, String clientId, String username, String scope, String redirectUri, String stateId, String tokenProperties) Constructs a newOAuthToken
data transfer object.
-
-
Method Details
-
getLookupKey
Gets the lookup key.- Returns:
- the lookup key to be used to store the entry in the
OAuthStore
-
getUniqueId
Gets the unique id.- Returns:
- the unique id
-
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
-
getType
Gets the token type.- Returns:
- the token type, "AUTHORIZATION_GRANT" or "ACCESS_TOKEN" for example
-
getSubType
Gets the token sub type.- Returns:
- the authorization grant type or access token type, "Code" or "Bearer" for example
-
getCreatedAt
public long getCreatedAt()Gets the time the token was created at.- Returns:
- the timestamp in milliseconds since the epoch when this token was created
-
getLifetimeInSeconds
public int getLifetimeInSeconds()Gets the token lifetime.- Returns:
- the lifetime in seconds of this token
-
getExpires
public long getExpires()Gets the time the token expires.- Returns:
- the timestamp in milliseconds since the epoch when this token expires
-
getTokenString
Gets the encoded token string.- Returns:
- the token string
-
getClientId
Gets the client id.- Returns:
- the id of the client the token was issued to
-
getUsername
Gets the user name.- Returns:
- the user the token was issued for
-
getScope
Gets the token scope.- Returns:
- the scope values that this token was approved for
-
getRedirectUri
Gets the redirect URI.- Returns:
- the redirect URI
-
getStateId
Gets the state id.- Returns:
- the state id
-
getTokenProperties
Gets the token extension properties as a JSON string.- Returns:
- the JSON string with the token extension properties
-
equals
-
hashCode
public int hashCode()
-