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 ClockclockClock used when comparing expire times.protected LongexpireTimeTime when the session is set to expire. 
- 
Constructor Summary
Constructors Modifier Constructor Description protectedOAuth2SessionInfo(Clock clock, DataStore dataStore)Constructs a OAuth2SessionInfo object. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LonggetExpireTime()Returns the expireTime of current auth token stored in theDataStoreimplementation.booleanisActive()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:SessionInfoReturns the status of the auth server session.- Specified by:
 isActivein interfaceSessionInfo- Returns:
 - true if the session is still valid; false otherwise.
 
 
- 
getExpireTime
public Long getExpireTime()
Description copied from interface:SessionInfoReturns the expireTime of current auth token stored in theDataStoreimplementation.- Specified by:
 getExpireTimein interfaceSessionInfo- Returns:
 - expire time of Auth token.
 
 
 - 
 
 -