Interface UserInfo

  • All Superinterfaces:
    java.security.Principal, java.io.Serializable

    public interface UserInfo
    extends java.security.Principal, java.io.Serializable
    Common interface for a User and can act as a facade. We depend on this so that we are not locked into a specific security framework such as Spring or Shiro. Roughly based on Springs UserDetails, Pac4js UserProfile/CommonProfile and Shiros Subject. Both the AppUser domain and the SpringUser implement this. see org.springframework.security.core.userdetails.UserDetails
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,​java.lang.Object> getAttributes()
      profile attributes info, sometimes can be claims in OAUTH
      default java.lang.String getDisplayName()
      The short display name or nickname for the user, can returns username or first part of email if username contains @, etc..
      java.lang.String getEmail()
      users email for username or lost password
      java.io.Serializable getId()
      The unique id for the user, be default will be the unique generated id from db usually a long
      default java.lang.String getName()
      the full name, may come from contact or defaults to username if not populated
      java.io.Serializable getOrgId()
      the organization ID, this is largely for Rally
      java.lang.String getPasswordHash()  
      java.util.Set getPermissions()
      Set of Permissions for this user.
      java.util.Set getRoles()
      Set of Roles, usually should be stringss
      java.lang.String getUsername()
      Returns the username used to authenticate the user.
      boolean isEnabled()
      Indicates whether the user is enabled or disabled.
      • Methods inherited from interface java.security.Principal

        equals, hashCode, implies, toString
    • Method Detail

      • getId

        java.io.Serializable getId()
        The unique id for the user, be default will be the unique generated id from db usually a long
      • getUsername

        java.lang.String getUsername()
        Returns the username used to authenticate the user. Cannot return `null`
      • getPasswordHash

        java.lang.String getPasswordHash()
      • getName

        default java.lang.String getName()
        the full name, may come from contact or defaults to username if not populated
        Specified by:
        getName in interface java.security.Principal
      • getDisplayName

        default java.lang.String getDisplayName()
        The short display name or nickname for the user, can returns username or first part of email if username contains @, etc..
      • getEmail

        java.lang.String getEmail()
        users email for username or lost password
      • getOrgId

        java.io.Serializable getOrgId()
        the organization ID, this is largely for Rally
      • isEnabled

        boolean isEnabled()
        Indicates whether the user is enabled or disabled. A disabled user cannot be authenticated.
      • getAttributes

        java.util.Map<java.lang.String,​java.lang.Object> getAttributes()
        profile attributes info, sometimes can be claims in OAUTH
      • getRoles

        java.util.Set getRoles()
        Set of Roles, usually should be stringss
      • getPermissions

        java.util.Set getPermissions()
        Set of Permissions for this user.