Class LoginRequest
java.lang.Object
net.sf.basedb.core.authentication.LoginRequest
Hold information about a login request such as login, password, etc.
- Since:
- 3.3
- Author:
- Nicklas
- Last modified
- $Date $
-
Field Summary
-
Constructor Summary
ConstructorDescriptionLoginRequest
(int userId, String password) Create a login request with user id + passwordLoginRequest
(int userId, String password, String deviceToken) Create a login request with user id + password + deviceTokenLoginRequest
(String login, String password) Create a login request with login + passwordLoginRequest
(String login, String password, String deviceToken) Create a login request with login + password + deviceToken -
Method Summary
Modifier and TypeMethodDescriptiongetAttribute
(String key) Get the value of an extra attribute to use for the login request.Get the comment to use.Get the deviceToken to use.getLogin()
Get the login name to use.Get the password to use.int
Get the user id to use.boolean
If this flag is set, the login parameters are only verified and the actual login is aborted.void
setAttribute
(String key, String value) Set an extra attribute to use for the login request.void
setComment
(String comment) Set the comment to use.void
setDeviceToken
(String deviceToken) Set the deviceToken to use.void
Set the login name to use.void
setPassword
(String password) Set the password to use.void
setUserId
(int userId) Set the user id to use.void
setVerifyOnly
(boolean verifyOnly) Set a flag to indicate if the login request should only verify the login parameters and not do a full login.
-
Field Details
-
verifyOnly
private boolean verifyOnly -
userId
private int userId -
login
-
password
-
deviceToken
-
comment
-
attributes
-
-
Constructor Details
-
LoginRequest
public LoginRequest() -
LoginRequest
Create a login request with login + password -
LoginRequest
Create a login request with login + password + deviceToken- Since:
- 3.12
-
LoginRequest
Create a login request with user id + password -
LoginRequest
Create a login request with user id + password + deviceToken- Since:
- 3.12
-
-
Method Details
-
setVerifyOnly
public void setVerifyOnly(boolean verifyOnly) Set a flag to indicate if the login request should only verify the login parameters and not do a full login.- Since:
- 3.19.3
-
isVerifyOnly
public boolean isVerifyOnly()If this flag is set, the login parameters are only verified and the actual login is aborted. If the verification is successful, theSessionControl.login(LoginRequest)
returns normally, otherwise an exception is thrown.- Since:
- 3.19.3
-
setUserId
public void setUserId(int userId) Set the user id to use. -
getUserId
public int getUserId()Get the user id to use. -
setLogin
Set the login name to use. -
getLogin
Get the login name to use. -
setPassword
Set the password to use. -
getPassword
Get the password to use. -
setDeviceToken
Set the deviceToken to use.- Since:
- 3.12
-
getDeviceToken
Get the deviceToken to use.- Since:
- 3.12
-
setComment
Set the comment to use. -
getComment
Get the comment to use. -
setAttribute
Set an extra attribute to use for the login request. -
getAttribute
Get the value of an extra attribute to use for the login request.
-