public class FRUser
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
FRUser.Browser |
| Modifier and Type | Method and Description |
|---|---|
static FRUser.Browser |
browser() |
AccessToken |
getAccessToken() |
void |
getAccessToken(FRListener<AccessToken> listener)
Retrieve the
AccessToken asynchronously, |
static FRUser |
getCurrentUser()
Retrieve the existing FRUser instance,
|
void |
getUserInfo(FRListener<UserInfo> listener)
Handles REST requests to the OpenId Connect userinfo endpoint for retrieving information about the user who granted
the authorization for the token.
|
static void |
login(android.content.Context context,
NodeListener<FRUser> listener)
Trigger the user login process, the login service name is defined under string.xml file with
forgerock_auth_service
|
void |
logout()
Logout the user
|
static void |
register(android.content.Context context,
NodeListener<FRUser> listener)
Trigger the user registration process, the registration service name is defined under string.xml file with
forgerock_registration_service
|
void |
revokeAccessToken(FRListener<java.lang.Void> listener)
Revoke the
AccessToken asynchronously, |
public static FRUser getCurrentUser()
If user session does not exist return null, otherwise return the existing FRUser with the associated user session, this cannot guarantee the existing user session is valid.
public void logout()
public void revokeAccessToken(FRListener<java.lang.Void> listener)
AccessToken asynchronously,listener - Listener to listen for token revocation event.public void getAccessToken(FRListener<AccessToken> listener)
AccessToken asynchronously,
If the stored AccessToken is expired, auto refresh the token.
listener - Listener to listen get Access Token event.public AccessToken getAccessToken() throws AuthenticationRequiredException
AuthenticationRequiredExceptionpublic void getUserInfo(FRListener<UserInfo> listener)
listener - Listener to listen get UserInfo event.public static void login(android.content.Context context,
NodeListener<FRUser> listener)
context - The Application Contextlistener - Listener to listen login event.
Throw AlreadyAuthenticatedException user session already exists.public static void register(android.content.Context context,
NodeListener<FRUser> listener)
context - The Application Contextlistener - Listener to listen register event.
Throw AlreadyAuthenticatedException user session already exists.public static FRUser.Browser browser()