Package io.inversion

Class User

java.lang.Object
io.inversion.User

public class User extends Object
  • Field Details

    • groups

      protected final Set<String> groups
    • roles

      protected final Set<String> roles
    • permissions

      protected final Set<String> permissions
    • id

      protected int id
    • tenant

      protected String tenant
    • username

      protected String username
    • password

      protected String password
    • displayName

      protected String displayName
    • accessKey

      protected String accessKey
    • secretKey

      protected String secretKey
    • requestAt

      protected long requestAt
      the time of the last request
    • remoteAddr

      protected String remoteAddr
      the remote host of the last request
    • failedNum

      protected int failedNum
      the number of consecutive failed logins
  • Constructor Details

    • User

      public User()
    • User

      public User(String username, String roles, String permissions)
  • Method Details

    • getTenantCode

      @Deprecated public String getTenantCode()
      Deprecated.
      Replaced by url mapped parameters such as host://myApi/{tenant}/endpoint
      Returns:
      the "tenant" url parameter
    • getUsername

      public String getUsername()
    • withUsername

      public User withUsername(String username)
    • getId

      public int getId()
    • withId

      public User withId(int id)
    • getRequestAt

      public long getRequestAt()
    • withRequestAt

      public User withRequestAt(long requestAt)
    • getRemoteAddr

      public String getRemoteAddr()
    • withRemoteAddr

      public User withRemoteAddr(String remoteAddr)
    • getFailedNum

      public int getFailedNum()
    • withFailedNum

      public User withFailedNum(int failedNum)
    • getAccessKey

      public String getAccessKey()
    • withAccessKey

      public User withAccessKey(String accessKey)
    • getSecretKey

      public String getSecretKey()
    • withSecretKey

      public User withSecretKey(String secretKey)
    • getPassword

      public String getPassword()
    • withPassword

      public User withPassword(String password)
    • getPermissions

      public List<String> getPermissions()
    • hasPermissions

      public boolean hasPermissions(String... permissions)
    • withPermissions

      public User withPermissions(String... permissions)
    • hasGroups

      public boolean hasGroups(String... groups)
    • getGroups

      public List<String> getGroups()
    • withGroups

      public User withGroups(String... groups)
    • getRoles

      public Set<String> getRoles()
    • hasRoles

      public boolean hasRoles(String... roles)
    • withRoles

      public User withRoles(String... roles)
    • getTenant

      public String getTenant()
    • withTenant

      public User withTenant(String tenant)
    • getDisplayName

      public String getDisplayName()
    • withDisplayName

      public User withDisplayName(String displayName)