public final class SecurityUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
getCurrentUserLogin()
Get the login of the current user.
|
static boolean |
isAuthenticated()
Check if a user is authenticated.
|
static boolean |
isCurrentUserInRole(String authority)
If the current user has a specific authority (security role).
|
public static String getCurrentUserLogin()
public static boolean isAuthenticated()
public static boolean isCurrentUserInRole(String authority)
The name of this method comes from the isUserInRole() method in the Servlet API
authority - the authority to checkCopyright © 2019 Power TAC. All rights reserved.