Class LoginRequest

java.lang.Object
net.sf.basedb.core.authentication.LoginRequest

public class LoginRequest extends Object
Hold information about a login request such as login, password, etc.
Since:
3.3
Author:
Nicklas
Last modified
$Date $
  • Field Details

    • verifyOnly

      private boolean verifyOnly
    • userId

      private int userId
    • login

      private String login
    • password

      private String password
    • deviceToken

      private String deviceToken
    • comment

      private String comment
    • attributes

      private Map<String,String> attributes
  • Constructor Details

    • LoginRequest

      public LoginRequest()
    • LoginRequest

      public LoginRequest(String login, String password)
      Create a login request with login + password
    • LoginRequest

      public LoginRequest(String login, String password, String deviceToken)
      Create a login request with login + password + deviceToken
      Since:
      3.12
    • LoginRequest

      public LoginRequest(int userId, String password)
      Create a login request with user id + password
    • LoginRequest

      public LoginRequest(int userId, String password, String deviceToken)
      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, the SessionControl.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

      public void setLogin(String login)
      Set the login name to use.
    • getLogin

      public String getLogin()
      Get the login name to use.
    • setPassword

      public void setPassword(String password)
      Set the password to use.
    • getPassword

      public String getPassword()
      Get the password to use.
    • setDeviceToken

      public void setDeviceToken(String deviceToken)
      Set the deviceToken to use.
      Since:
      3.12
    • getDeviceToken

      public String getDeviceToken()
      Get the deviceToken to use.
      Since:
      3.12
    • setComment

      public void setComment(String comment)
      Set the comment to use.
    • getComment

      public String getComment()
      Get the comment to use.
    • setAttribute

      public void setAttribute(String key, String value)
      Set an extra attribute to use for the login request.
    • getAttribute

      public String getAttribute(String key)
      Get the value of an extra attribute to use for the login request.