Class AuthenticatedUser
java.lang.Object
net.sf.basedb.core.authentication.AuthenticatedUser
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
-
Field Summary
Modifier and TypeFieldDescriptionprivate final String
private ExtraUserInformation
private final int
private final String
private final AuthenticationMethod
-
Constructor Summary
ConstructorDescriptionAuthenticatedUser
(AuthenticationMethod method, String login, String externalId) Creates a newAuthenticatedUser
object without any link to an existing user in BASE.AuthenticatedUser
(AuthenticationMethod method, UserData user) Creates a newAuthenticatedUser
object with a link to an existing user in BASE. -
Method Summary
Modifier and TypeMethodDescriptionGet the authentication method that was used to verify the login.Get the external id for the user.Get extra information about the user.int
Get the internal id for the user (0 if not known)getLogin()
Get the login string for the user.boolean
Check if extra information about the user has been provided.void
setExtraInformation
(ExtraUserInformation extraInfo) Set extra information about the user.
-
Field Details
-
method
-
login
-
externalId
-
internalId
private final int internalId -
extraInfo
-
-
Constructor Details
-
AuthenticatedUser
Creates a newAuthenticatedUser
object without any link to an existing user in BASE.- Parameters:
method
- The authentication method used to verify the userlogin
- The login nameexternalId
- The unique externalId of the user
-
AuthenticatedUser
Creates a newAuthenticatedUser
object with a link to an existing user in BASE.- Parameters:
method
- The authentication method used to verify the useruser
- The UserData object for an existing user
-
-
Method Details
-
getAuthenticationMethod
Get the authentication method that was used to verify the login. -
getLogin
Get the login string for the user. -
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
Get extra information about the user. -
setExtraInformation
Set extra information about the user.
-