Class OAuth2SessionInfo
java.lang.Object
org.forgerock.oauth.clients.oauth2.OAuth2SessionInfo
- All Implemented Interfaces:
SessionInfo
- Direct Known Subclasses:
OpenIDConnectSessionInfo
OAuth2 Session Info Object used to determine if the access token expiry time has passed and to determine
if a session is still active.
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
OAuth2SessionInfo
(Clock clock, DataStore dataStore) Constructs a OAuth2SessionInfo object. -
Method Summary
-
Field Details
-
clock
Clock used when comparing expire times. -
expireTime
Time when the session is set to expire.
-
-
Constructor Details
-
OAuth2SessionInfo
Constructs a OAuth2SessionInfo object.- Parameters:
clock
- clock.dataStore
- data store implementation used to retrieve session information from.- Throws:
OAuthException
- when there is an issue retrieving data from the data store.
-
-
Method Details
-
isActive
public boolean isActive()Description copied from interface:SessionInfo
Returns the status of the auth server session.- Specified by:
isActive
in interfaceSessionInfo
- Returns:
- true if the session is still valid; false otherwise.
-
getExpireTime
Description copied from interface:SessionInfo
Returns the expireTime of current auth token stored in theDataStore
implementation.- Specified by:
getExpireTime
in interfaceSessionInfo
- Returns:
- expire time of Auth token.
-