public class PrincipalUtils extends Object
| Constructor and Description |
|---|
PrincipalUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Set<String> |
getRoles()
Obtain the list of user roles.
|
static Subject |
getSubject()
Obtain current authenticated subject
|
static String |
getUser()
Obtain the logged user.
|
static boolean |
hasRole(String role)
Check for role
|
public static Subject getSubject() throws NamingException
NamingExceptionpublic static String getUser() throws NamingException
NamingExceptionpublic static Set<String> getRoles() throws NamingException
NamingExceptionpublic static boolean hasRole(String role)
Copyright © 2016. All rights reserved.