Package 

Class FRUser

  • All Implemented Interfaces:

    
    public class FRUser
    
                        
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public class FRUser.Browser
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      static FRUser getCurrentUser() Retrieve the existing FRUser instance, 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.
      void logout() Logout the user
      void revokeAccessToken(FRListener<Void> listener) Revoke the AccessToken asynchronously,
      void getAccessToken(FRListener<AccessToken> listener) Retrieve the AccessToken asynchronously, If the stored AccessToken is expired, auto refresh the token if refresh token is available.
      AccessToken getAccessToken() Retrieve the AccessToken, if the stored AccessToken is expired, auto refresh the token it refresh token is available.
      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(Context context, NodeListener<FRUser> listener) Trigger the user login process, the login service name is defined under string.
      static void register(Context context, NodeListener<FRUser> listener) Trigger the user registration process, the registration service name is defined under string.
      static FRUser.Browser browser()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • getCurrentUser

         static FRUser getCurrentUser()

        Retrieve the existing FRUser instance,

        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.

      • logout

         void logout()

        Logout the user

      • getUserInfo

         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.

        Parameters:
        listener - Listener to listen get UserInfo event.
      • login

         static void login(Context context, NodeListener<FRUser> listener)

        Trigger the user login process, the login service name is defined under string.xml file with forgerock_auth_service

        Parameters:
        context - The Application Context
        listener - Listener to listen login event.
      • register

         static void register(Context context, NodeListener<FRUser> listener)

        Trigger the user registration process, the registration service name is defined under string.xml file with forgerock_registration_service

        Parameters:
        context - The Application Context
        listener - Listener to listen register event.