public class FHAuthSession extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
SESSION_TOKEN_KEY |
| Constructor and Description |
|---|
FHAuthSession(DataManager pDataManager,
FHHttpClient pHttpClient)
Boring constructor with no side effects.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear(boolean pSync)
Removes the session token on the device and tries to remove it remotely as well.
|
boolean |
exists()
Checks if a sessionToken value exists on the device.
|
String |
getToken()
Gets the value of the current session token.
|
void |
save(String sessionToken)
Saves the seesionToken value on the device.
|
void |
verify(FHAuthSession.Callback pCallback,
boolean pSync)
Calls the remote server to check if the existing sessionToken is actually valid.
|
public static final String SESSION_TOKEN_KEY
public FHAuthSession(DataManager pDataManager, FHHttpClient pHttpClient)
pDataManager - a DataManager instance to injectpHttpClient - a FHHttpClient to injectpublic boolean exists()
public String getToken()
public void save(String sessionToken)
sessionToken - Session tokenpublic void verify(FHAuthSession.Callback pCallback, boolean pSync)
pCallback - a callback to be executed when remote call is completedpSync - A flag to call it syncpublic void clear(boolean pSync)
pSync - A flag to call it syncCopyright © 2016 Red Hat. All rights reserved.