Class OAuth2SessionInfo
- java.lang.Object
-
- org.forgerock.oauth.clients.oauth2.OAuth2SessionInfo
-
- All Implemented Interfaces:
SessionInfo
- Direct Known Subclasses:
OpenIDConnectSessionInfo
public class OAuth2SessionInfo extends Object implements SessionInfo
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
Fields Modifier and Type Field Description protected Clock
clock
Clock used when comparing expire times.protected Long
expireTime
Time when the session is set to expire.
-
Constructor Summary
Constructors Modifier Constructor Description protected
OAuth2SessionInfo(Clock clock, DataStore dataStore)
Constructs a OAuth2SessionInfo object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Long
getExpireTime()
Returns the expireTime of current auth token stored in theDataStore
implementation.boolean
isActive()
Returns the status of the auth server session.
-
-
-
Constructor Detail
-
OAuth2SessionInfo
protected OAuth2SessionInfo(Clock clock, DataStore dataStore) throws OAuthException
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 Detail
-
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
public Long 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.
-
-