public interface SecurityService
| Modifier and Type | Method and Description |
|---|---|
Optional<Authentication> |
getAuthentication()
Retrieves
Authentication if authenticated. |
boolean |
hasRole(String role)
If the current user has a specific role.
|
boolean |
hasRole(String role,
String rolesKey)
If the current user has a specific role.
|
boolean |
isAuthenticated()
Check if a user is authenticated.
|
Optional<String> |
username()
Get the username of the current user.
|
Optional<String> username()
Optional<Authentication> getAuthentication()
Authentication if authenticated.Authentication of the current userboolean isAuthenticated()
boolean hasRole(String role)
role - the role to check