Class AnonymousSessionManager

  • All Implemented Interfaces:
    SessionManager

    public class AnonymousSessionManager
    extends java.lang.Object
    implements SessionManager
    The AnonymousSessionManager is a SessionManager implementation that uses anonymous Gini users.
    • Constructor Detail

      • AnonymousSessionManager

        public AnonymousSessionManager​(java.lang.String emailDomain,
                                       UserCenterManager userCenterManager,
                                       CredentialsStore credentialsStore)
    • Method Detail

      • loginUser

        public bolts.Task<Session> loginUser()
        Log in the user whose credentials are currently stored in the credentials store. If there are no stored user credentials, this method will create a new user via the UserCenterManager and then log in the newly created user. If the email domain is different in the existing user credentials from the one that was provided for this instance, a new email with the new domain will be generated and the old email will be replaced.
        Returns:
        A task which will resolve to valid Session instance.
      • createUser

        protected bolts.Task<UserCredentials> createUser()
        Creates a new user via the UserCenterManager. The user credentials of the freshly created user are then stored in the credentials store.

        Warning: This method overwrites the credentials of an existing user.

        Returns:
        A task which will resolve to a UserCredentials instance which store the credentials of the freshly created user.