public final class UserDatabaseRealm.UserDatabasePrincipal extends GenericPrincipal
gssCredential, loginContext, name, password, roles, userPrincipal
Constructor and Description |
---|
UserDatabasePrincipal(User user) |
Modifier and Type | Method and Description |
---|---|
String[] |
getRoles() |
boolean |
hasRole(String role)
Does the user represented by this Principal possess the specified role?
|
getGssCredential, getName, getPassword, getUserPrincipal, logout, setGssCredential, toString
public UserDatabasePrincipal(User user)
public String[] getRoles()
getRoles
in class GenericPrincipal
public boolean hasRole(String role)
GenericPrincipal
hasRole
in class GenericPrincipal
role
- Role to be testedtrue
if this Principal has been assigned the given
role, otherwise false
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.