public class AuthenticatedUser extends Object
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
.Modifier and Type | Field and Description |
---|---|
private String |
externalId |
private ExtraUserInformation |
extraInfo |
private int |
internalId |
private String |
login |
private AuthenticationMethod |
method |
Constructor and Description |
---|
AuthenticatedUser(AuthenticationMethod method,
String login,
String externalId)
Creates a new
AuthenticatedUser object without any
link to an existing user in BASE. |
AuthenticatedUser(AuthenticationMethod method,
UserData user)
Creates a new
AuthenticatedUser object with
a link to an existing user in BASE. |
Modifier and Type | Method and Description |
---|---|
AuthenticationMethod |
getAuthenticationMethod()
Get the authentication method that was used to verify the login.
|
String |
getExternalId()
Get the external id for the user.
|
ExtraUserInformation |
getExtraInformation()
Get extra information about the user.
|
int |
getInternalId()
Get the internal id for the user (0 if not known)
|
String |
getLogin()
Get the login string for the user.
|
boolean |
hasExtraInformation()
Check if extra information about the user has been provided.
|
void |
setExtraInformation(ExtraUserInformation extraInfo)
Set extra information about the user.
|
private final AuthenticationMethod method
private final String login
private final String externalId
private final int internalId
private ExtraUserInformation extraInfo
public AuthenticatedUser(AuthenticationMethod method, String login, String externalId)
AuthenticatedUser
object without any
link to an existing user in BASE.method
- The authentication method used to verify the userlogin
- The login nameexternalId
- The unique externalId of the userpublic AuthenticatedUser(AuthenticationMethod method, UserData user)
AuthenticatedUser
object with
a link to an existing user in BASE.method
- The authentication method used to verify the useruser
- The UserData object for an existing userpublic AuthenticationMethod getAuthenticationMethod()
public String getLogin()
public String getExternalId()
public int getInternalId()
public boolean hasExtraInformation()
public ExtraUserInformation getExtraInformation()
public void setExtraInformation(ExtraUserInformation extraInfo)