public interface AuthService
| Modifier and Type | Method and Description |
|---|---|
void |
assertAuthenticated() |
void |
assertIdentity(String userId) |
void |
assertRole(String applicationRole) |
void |
assertURIAccess(String uri)
Check if resource (URI) is secure and if required roles are available
|
Authentication |
getAuthentication() |
Set<String> |
getGrantedRoles()
returns the application roles for the current user
|
Set<String> |
getGroupIds() |
boolean |
hasRole(String applicationRole) |
boolean |
isAuthenticated()
Check is user is authenticated in system
|
boolean |
isIdentity(String userId) |
void |
login(String userName,
String password) |
void |
logout() |
void |
setListener(AuthListener listener) |
void assertAuthenticated()
throws PermissionDeniedException
PermissionDeniedExceptionvoid assertIdentity(String userId) throws PermissionDeniedException
PermissionDeniedExceptionvoid assertRole(String applicationRole) throws PermissionDeniedException
PermissionDeniedExceptionvoid assertURIAccess(String uri) throws PermissionDeniedException
uri - resource address that for checkingPermissionDeniedException - throw if required are not availableAuthentication getAuthentication()
boolean hasRole(String applicationRole)
boolean isAuthenticated()
TRUE if user is authenticatedFALSE if user is not authenticatedboolean isIdentity(String userId)
void login(String userName, String password) throws AuthenticationFailedException
AuthenticationFailedExceptionvoid logout()
void setListener(AuthListener listener)
Copyright © 2010–2021 Vegard IT GmbH, Germany. All rights reserved.