Class AuthenticatedUser


  • public class AuthenticatedUser
    extends Object
    Objects of this class are returned by the AuthenticationManager.authenticate() method and contains information about the authenticated user. This class provide information about the login and/or external id for the user as well as the AuthenticationMethod that was used. Additional information for the user may be provided by ExtraUserInformation.
    Since:
    3.3
    Author:
    Nicklas
    • Constructor Detail

      • AuthenticatedUser

        public AuthenticatedUser​(AuthenticationMethod method,
                                 String login,
                                 String externalId)
        Creates a new AuthenticatedUser object without any link to an existing user in BASE.
        Parameters:
        method - The authentication method used to verify the user
        login - The login name
        externalId - The unique externalId of the user
      • AuthenticatedUser

        public AuthenticatedUser​(AuthenticationMethod method,
                                 UserData user)
        Creates a new AuthenticatedUser object with a link to an existing user in BASE.
        Parameters:
        method - The authentication method used to verify the user
        user - The UserData object for an existing user
    • Method Detail

      • getAuthenticationMethod

        public AuthenticationMethod getAuthenticationMethod()
        Get the authentication method that was used to verify the login.
      • getLogin

        public String getLogin()
        Get the login string for the user.
      • getExternalId

        public String getExternalId()
        Get the external id for the user.
      • getInternalId

        public int getInternalId()
        Get the internal id for the user (0 if not known)
      • hasExtraInformation

        public boolean hasExtraInformation()
        Check if extra information about the user has been provided.
      • getExtraInformation

        public ExtraUserInformation getExtraInformation()
        Get extra information about the user.
      • setExtraInformation

        public void setExtraInformation​(ExtraUserInformation extraInfo)
        Set extra information about the user.