public class AuthImpl extends ClientImpl implements BaseAuth, Serializable
| Modifier and Type | Method and Description |
|---|---|
void |
assignRole(String userId,
String roleId) |
void |
changeSecurity(String uuid,
ChangeSecurity changeSecurity) |
void |
createRole(String roleId,
boolean active) |
void |
createUser(String userId,
String password,
String email,
String name,
boolean active) |
void |
deleteRole(String roleId) |
void |
deleteUser(String userId) |
Map<String,Integer> |
getGrantedRoles(String uuid) |
Map<String,Integer> |
getGrantedUsers(String uuid) |
GrantedUsersAndRolesItem |
getGrantedUsersAndRoles(String uuid) |
List<Profile> |
getProfiles(boolean filterByActive) |
List<String> |
getRoles(boolean showAll) |
List<String> |
getRolesByUser(String userId) |
String |
getSessionId() |
CommonUser |
getUser(String userId) |
Profile |
getUserProfile(String userId) |
List<CommonUser> |
getUsers(boolean showAll) |
List<CommonUser> |
getUsersByRole(String roleId) |
List<Tenant> |
getUserTenants() |
void |
grantRole(String uuid,
String roleId,
int permissions,
boolean recursive) |
void |
grantUser(String uuid,
String userId,
int permissions,
boolean recursive) |
boolean |
hasSecurityRecursive() |
boolean |
isAdmin() |
boolean |
isLoginLowercase() |
boolean |
isPasswordExpired() |
protected String |
login(String user,
String password) |
protected String |
login(String user,
String password,
int expiration,
boolean restrictIp) |
protected void |
logout() |
void |
removeRole(String userId,
String roleId) |
void |
revokeRole(String uuid,
String roleId,
int permissions,
boolean recursive) |
void |
revokeUser(String uuid,
String userId,
int permissions,
boolean recursive) |
void |
setAuthorizationToken(String authorizationToken)
setAuthenticationToken
|
void |
setRolePermissions(String uuid,
String roleId,
int permissions,
boolean recursive) |
void |
setUserPermissions(String uuid,
String userId,
int permissions,
boolean recursive) |
void |
setUserProfile(String userId,
long profileId) |
void |
setUserTenant(long tenantId) |
void |
updateRole(String roleId,
boolean active) |
void |
updateUser(String userId,
String password,
String email,
String name,
boolean active) |
getClient, resource, resourcepublic AuthImpl(String host)
public void setAuthorizationToken(String authorizationToken)
setAuthorizationToken in interface BaseAuthprotected String login(String user, String password) throws UnknownException, WebserviceException, AuthenticationException
protected String login(String user, String password, int expiration, boolean restrictIp) throws UnknownException, WebserviceException, AuthenticationException
protected void logout()
throws UnknownException,
WebserviceException
UnknownExceptionWebserviceExceptionpublic String getSessionId() throws UnknownException, WebserviceException
getSessionId in interface BaseAuthUnknownExceptionWebserviceExceptionpublic GrantedUsersAndRolesItem getGrantedUsersAndRoles(String uuid) throws AccessDeniedException, RepositoryException, DatabaseException, PathNotFoundException, UnknownException, WebserviceException
getGrantedUsersAndRoles in interface BaseAuthAccessDeniedExceptionRepositoryExceptionDatabaseExceptionPathNotFoundExceptionUnknownExceptionWebserviceExceptionpublic Map<String,Integer> getGrantedRoles(String uuid) throws AccessDeniedException, RepositoryException, DatabaseException, PathNotFoundException, WebserviceException, UnknownException
getGrantedRoles in interface BaseAuthAccessDeniedExceptionRepositoryExceptionDatabaseExceptionPathNotFoundExceptionWebserviceExceptionUnknownExceptionpublic Map<String,Integer> getGrantedUsers(String uuid) throws AccessDeniedException, RepositoryException, DatabaseException, PathNotFoundException, WebserviceException, UnknownException
getGrantedUsers in interface BaseAuthAccessDeniedExceptionRepositoryExceptionDatabaseExceptionPathNotFoundExceptionWebserviceExceptionUnknownExceptionpublic List<String> getRoles(boolean showAll) throws AccessDeniedException, RepositoryException, DatabaseException, PrincipalAdapterException, WebserviceException, UnknownException
getRoles in interface BaseAuthAccessDeniedExceptionRepositoryExceptionDatabaseExceptionPrincipalAdapterExceptionWebserviceExceptionUnknownExceptionpublic List<String> getRolesByUser(String userId) throws AccessDeniedException, RepositoryException, DatabaseException, PrincipalAdapterException, WebserviceException, UnknownException
getRolesByUser in interface BaseAuthAccessDeniedExceptionRepositoryExceptionDatabaseExceptionPrincipalAdapterExceptionWebserviceExceptionUnknownExceptionpublic List<CommonUser> getUsers(boolean showAll) throws AccessDeniedException, RepositoryException, DatabaseException, PrincipalAdapterException, UnknownException, WebserviceException
getUsers in interface BaseAuthAccessDeniedExceptionRepositoryExceptionDatabaseExceptionPrincipalAdapterExceptionUnknownExceptionWebserviceExceptionpublic CommonUser getUser(String userId) throws AccessDeniedException, RepositoryException, DatabaseException, PrincipalAdapterException, UnknownException, WebserviceException
getUser in interface BaseAuthAccessDeniedExceptionRepositoryExceptionDatabaseExceptionPrincipalAdapterExceptionUnknownExceptionWebserviceExceptionpublic List<CommonUser> getUsersByRole(String roleId) throws AccessDeniedException, RepositoryException, DatabaseException, PrincipalAdapterException, UnknownException, WebserviceException
getUsersByRole in interface BaseAuthAccessDeniedExceptionRepositoryExceptionDatabaseExceptionPrincipalAdapterExceptionUnknownExceptionWebserviceExceptionpublic void revokeRole(String uuid, String roleId, int permissions, boolean recursive) throws AccessDeniedException, RepositoryException, DatabaseException, PathNotFoundException, UnknownException, WebserviceException
revokeRole in interface BaseAuthAccessDeniedExceptionRepositoryExceptionDatabaseExceptionPathNotFoundExceptionUnknownExceptionWebserviceExceptionpublic void revokeUser(String uuid, String userId, int permissions, boolean recursive) throws AccessDeniedException, RepositoryException, DatabaseException, PathNotFoundException, UnknownException, WebserviceException
revokeUser in interface BaseAuthAccessDeniedExceptionRepositoryExceptionDatabaseExceptionPathNotFoundExceptionUnknownExceptionWebserviceExceptionpublic void grantRole(String uuid, String roleId, int permissions, boolean recursive) throws AccessDeniedException, RepositoryException, DatabaseException, PathNotFoundException, UnknownException, WebserviceException
grantRole in interface BaseAuthAccessDeniedExceptionRepositoryExceptionDatabaseExceptionPathNotFoundExceptionUnknownExceptionWebserviceExceptionpublic void grantUser(String uuid, String userId, int permissions, boolean recursive) throws AccessDeniedException, RepositoryException, DatabaseException, PathNotFoundException, UnknownException, WebserviceException
grantUser in interface BaseAuthAccessDeniedExceptionRepositoryExceptionDatabaseExceptionPathNotFoundExceptionUnknownExceptionWebserviceExceptionpublic void createUser(String userId, String password, String email, String name, boolean active) throws PrincipalAdapterException, UnknownException, WebserviceException
createUser in interface BaseAuthPrincipalAdapterExceptionUnknownExceptionWebserviceExceptionpublic void deleteUser(String userId) throws PrincipalAdapterException, UnknownException, WebserviceException
deleteUser in interface BaseAuthPrincipalAdapterExceptionUnknownExceptionWebserviceExceptionpublic void updateUser(String userId, String password, String email, String name, boolean active) throws PrincipalAdapterException, UnknownException, WebserviceException
updateUser in interface BaseAuthPrincipalAdapterExceptionUnknownExceptionWebserviceExceptionpublic void createRole(String roleId, boolean active) throws PrincipalAdapterException, UnknownException, WebserviceException
createRole in interface BaseAuthPrincipalAdapterExceptionUnknownExceptionWebserviceExceptionpublic void deleteRole(String roleId) throws PrincipalAdapterException, UnknownException, WebserviceException
deleteRole in interface BaseAuthPrincipalAdapterExceptionUnknownExceptionWebserviceExceptionpublic void updateRole(String roleId, boolean active) throws PrincipalAdapterException, UnknownException, WebserviceException
updateRole in interface BaseAuthPrincipalAdapterExceptionUnknownExceptionWebserviceExceptionpublic void assignRole(String userId, String roleId) throws PrincipalAdapterException, UnknownException, WebserviceException
assignRole in interface BaseAuthPrincipalAdapterExceptionUnknownExceptionWebserviceExceptionpublic void removeRole(String userId, String roleId) throws PrincipalAdapterException, UnknownException, WebserviceException
removeRole in interface BaseAuthPrincipalAdapterExceptionUnknownExceptionWebserviceExceptionpublic void changeSecurity(String uuid, ChangeSecurity changeSecurity) throws PathNotFoundException, AccessDeniedException, RepositoryException, DatabaseException, UnknownException, WebserviceException
changeSecurity in interface BaseAuthPathNotFoundExceptionAccessDeniedExceptionRepositoryExceptionDatabaseExceptionUnknownExceptionWebserviceExceptionpublic List<Profile> getProfiles(boolean filterByActive) throws PrincipalAdapterException, WebserviceException, UnknownException
getProfiles in interface BaseAuthPrincipalAdapterExceptionWebserviceExceptionUnknownExceptionpublic Profile getUserProfile(String userId) throws PrincipalAdapterException, WebserviceException, UnknownException
getUserProfile in interface BaseAuthPrincipalAdapterExceptionWebserviceExceptionUnknownExceptionpublic void setUserProfile(String userId, long profileId) throws PrincipalAdapterException, WebserviceException, UnknownException
setUserProfile in interface BaseAuthPrincipalAdapterExceptionWebserviceExceptionUnknownExceptionpublic void setUserPermissions(String uuid, String userId, int permissions, boolean recursive) throws AccessDeniedException, RepositoryException, DatabaseException, PathNotFoundException, UnknownException, WebserviceException
setUserPermissions in interface BaseAuthAccessDeniedExceptionRepositoryExceptionDatabaseExceptionPathNotFoundExceptionUnknownExceptionWebserviceExceptionpublic void setRolePermissions(String uuid, String roleId, int permissions, boolean recursive) throws AccessDeniedException, RepositoryException, DatabaseException, PathNotFoundException, UnknownException, WebserviceException
setRolePermissions in interface BaseAuthAccessDeniedExceptionRepositoryExceptionDatabaseExceptionPathNotFoundExceptionUnknownExceptionWebserviceExceptionpublic List<Tenant> getUserTenants() throws AccessDeniedException, RepositoryException, DatabaseException, PathNotFoundException, UnknownException, WebserviceException
getUserTenants in interface BaseAuthAccessDeniedExceptionRepositoryExceptionDatabaseExceptionPathNotFoundExceptionUnknownExceptionWebserviceExceptionpublic void setUserTenant(long tenantId)
throws AccessDeniedException,
RepositoryException,
DatabaseException,
PathNotFoundException,
UnknownException,
WebserviceException
setUserTenant in interface BaseAuthAccessDeniedExceptionRepositoryExceptionDatabaseExceptionPathNotFoundExceptionUnknownExceptionWebserviceExceptionpublic boolean isAdmin()
throws PrincipalAdapterException,
UnknownException,
WebserviceException
isAdmin in interface BaseAuthPrincipalAdapterExceptionUnknownExceptionWebserviceExceptionpublic boolean hasSecurityRecursive()
throws UnknownException,
WebserviceException
hasSecurityRecursive in interface BaseAuthUnknownExceptionWebserviceExceptionpublic boolean isLoginLowercase()
throws UnknownException,
WebserviceException
isLoginLowercase in interface BaseAuthUnknownExceptionWebserviceExceptionpublic boolean isPasswordExpired()
throws UnknownException,
WebserviceException
isPasswordExpired in interface BaseAuthUnknownExceptionWebserviceExceptionCopyright © 2021 Open Knowledge Management System S.L.. All Rights Reserved.