Package org.forgerock.http.oauth2
Class AccessTokenInfo
- java.lang.Object
- 
- org.forgerock.http.oauth2.AccessTokenInfo
 
- 
 public class AccessTokenInfo extends Object Represents an OAuth2 Access Token.
- 
- 
Field SummaryFields Modifier and Type Field Description static longNEVER_EXPIRESMarker for never ending tokens.
 - 
Constructor SummaryConstructors Constructor Description AccessTokenInfo(JsonValue rawInfo, String token, Set<String> scopes, long expiresAt)Build anAccessTokenInfowith the provided information.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonValueasJsonValue()Returns the raw JSON as aJsonValue.longgetExpiresAt()Returns the time (expressed as a timestamp in milliseconds since epoch) when this token will be expired.Map<String,Object>getInfo()Returns the raw JSON as a map.Set<String>getScopes()Returns the scopes associated to this token.StringgetToken()Returns the access token identifier issued from the authorization server.
 
- 
- 
- 
Field Detail- 
NEVER_EXPIRESpublic static final long NEVER_EXPIRES Marker for never ending tokens.- See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
AccessTokenInfopublic AccessTokenInfo(JsonValue rawInfo, String token, Set<String> scopes, long expiresAt) Build anAccessTokenInfowith the provided information.- Parameters:
- rawInfo- raw response message
- token- token identifier
- scopes- scopes of the token
- expiresAt- Token expiration time expressed as a timestamp, in milliseconds since epoch
 
 
- 
 - 
Method Detail- 
getInfopublic Map<String,Object> getInfo() Returns the raw JSON as a map.- Returns:
- the raw JSON as a map.
 
 - 
asJsonValuepublic JsonValue asJsonValue() Returns the raw JSON as aJsonValue.- Returns:
- the raw JSON as a JsonValue.
 
 - 
getTokenpublic String getToken() Returns the access token identifier issued from the authorization server.- Returns:
- the access token identifier issued from the authorization server.
 
 - 
getScopespublic Set<String> getScopes() Returns the scopes associated to this token. Will return an empty Set if no scopes are associated with this token.- Returns:
- the scopes associated to this token.
 
 - 
getExpiresAtpublic long getExpiresAt() Returns the time (expressed as a timestamp in milliseconds since epoch) when this token will be expired. If theNEVER_EXPIRESconstant is returned, this token is always considered as available.- Returns:
- the time (expressed as a timestamp, in milliseconds since epoch) when this token will be expired.
 
 
- 
 
-