Class UserDatabaseRealm.UserDatabasePrincipal

java.lang.Object
org.apache.catalina.realm.GenericPrincipal
org.apache.catalina.realm.UserDatabaseRealm.UserDatabasePrincipal
All Implemented Interfaces:
Serializable, Principal, TomcatPrincipal
Enclosing class:
UserDatabaseRealm

public static final class UserDatabaseRealm.UserDatabasePrincipal extends GenericPrincipal
See Also:
  • Constructor Details

    • UserDatabasePrincipal

      public UserDatabasePrincipal(User user, UserDatabase database)
  • Method Details

    • getRoles

      public String[] getRoles()
      Overrides:
      getRoles in class GenericPrincipal
    • hasRole

      public boolean hasRole(String role)
      Description copied from class: GenericPrincipal
      Does the user represented by this Principal possess the specified role?
      Overrides:
      hasRole in class GenericPrincipal
      Parameters:
      role - Role to be tested
      Returns:
      true if this Principal has been assigned the given role, otherwise false