public class SessionService extends java.lang.Object implements ISessionService
| Constructor and Description |
|---|
SessionService(android.content.Context context,
Config config,
IPersistenceService psService,
ISecureKey secureKey) |
| Modifier and Type | Method and Description |
|---|---|
void |
addInterceptor(GigyaInterceptor interceptor)
Add custom session interception.
|
void |
cancelSessionCountdownTimer()
Cancel running timer if reference is not null.
|
void |
clear(boolean clearStorage)
Clear session from memory.
|
java.lang.String |
decryptSession(java.lang.String encrypted,
java.security.Key key) |
java.lang.String |
encryptSession(java.lang.String plain,
java.security.Key key) |
SessionInfo |
getSession()
Get current available session.
|
boolean |
isValid()
Check id current session validity.
|
void |
load()
Load current persistent session.
|
void |
refreshSessionExpiration()
Refresh the current session expiration timestamp.
|
void |
save(SessionInfo sessionInfo)
Persist session info using current encryption algorithm.
|
void |
setSession(SessionInfo sessionInfo)
External session setter interface.
|
void |
startSessionCountdownTimerIfNeeded()
Check if session countdown is required.
|
public SessionService(android.content.Context context, Config config, IPersistenceService psService, ISecureKey secureKey)
public java.lang.String encryptSession(java.lang.String plain, java.security.Key key) throws EncryptionException
encryptSession in interface ISessionServiceEncryptionExceptionpublic java.lang.String decryptSession(java.lang.String encrypted, java.security.Key key) throws EncryptionException
decryptSession in interface ISessionServiceEncryptionExceptionpublic void save(SessionInfo sessionInfo)
save in interface ISessionServicesessionInfo - Provided session.public void load()
load in interface ISessionServicepublic SessionInfo getSession()
getSession in interface ISessionServicepublic void setSession(SessionInfo sessionInfo)
setSession in interface ISessionServicesessionInfo - Provided session.public boolean isValid()
isValid in interface ISessionServicepublic void clear(boolean clearStorage)
clear in interface ISessionServiceclearStorage - Set True if session should be cleared from persistence as well.public void cancelSessionCountdownTimer()
cancelSessionCountdownTimer in interface ISessionServicepublic void addInterceptor(GigyaInterceptor interceptor)
setSession(com.gigya.android.sdk.session.SessionInfo)addInterceptor in interface ISessionServiceinterceptor - Provided interceptor implementation.public void refreshSessionExpiration()
refreshSessionExpiration in interface ISessionServicepublic void startSessionCountdownTimerIfNeeded()
startSessionCountdownTimerIfNeeded in interface ISessionService