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() |
String |
login(String user,
String password) |
String |
login(String user,
String password,
int expiration,
boolean restrictIp) |
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, getClient, resource, resourcepublic AuthImpl(String host)
public void setAuthorizationToken(String authorizationToken)
setAuthorizationToken in interface BaseAuthpublic String login(String user, String password) throws UnknowException, WebserviceException, AuthenticationException
login in interface BaseAuthUnknowExceptionWebserviceExceptionAuthenticationExceptionpublic String login(String user, String password, int expiration, boolean restrictIp) throws UnknowException, WebserviceException, AuthenticationException
login in interface BaseAuthUnknowExceptionWebserviceExceptionAuthenticationExceptionpublic void logout()
throws UnknowException,
WebserviceException,
AuthenticationException
logout in interface BaseAuthUnknowExceptionWebserviceExceptionAuthenticationExceptionpublic String getSessionId() throws UnknowException, WebserviceException
getSessionId in interface BaseAuthUnknowExceptionWebserviceExceptionpublic GrantedUsersAndRolesItem getGrantedUsersAndRoles(String uuid) throws AccessDeniedException, RepositoryException, DatabaseException, PathNotFoundException, UnknowException, WebserviceException
getGrantedUsersAndRoles in interface BaseAuthAccessDeniedExceptionRepositoryExceptionDatabaseExceptionPathNotFoundExceptionUnknowExceptionWebserviceExceptionpublic Map<String,Integer> getGrantedRoles(String uuid) throws AccessDeniedException, RepositoryException, DatabaseException, PathNotFoundException, WebserviceException, UnknowException
getGrantedRoles in interface BaseAuthAccessDeniedExceptionRepositoryExceptionDatabaseExceptionPathNotFoundExceptionWebserviceExceptionUnknowExceptionpublic Map<String,Integer> getGrantedUsers(String uuid) throws AccessDeniedException, RepositoryException, DatabaseException, PathNotFoundException, WebserviceException, UnknowException
getGrantedUsers in interface BaseAuthAccessDeniedExceptionRepositoryExceptionDatabaseExceptionPathNotFoundExceptionWebserviceExceptionUnknowExceptionpublic List<String> getRoles(boolean showAll) throws AccessDeniedException, RepositoryException, DatabaseException, PrincipalAdapterException, WebserviceException, UnknowException
getRoles in interface BaseAuthAccessDeniedExceptionRepositoryExceptionDatabaseExceptionPrincipalAdapterExceptionWebserviceExceptionUnknowExceptionpublic List<String> getRolesByUser(String userId) throws AccessDeniedException, RepositoryException, DatabaseException, PrincipalAdapterException, WebserviceException, UnknowException
getRolesByUser in interface BaseAuthAccessDeniedExceptionRepositoryExceptionDatabaseExceptionPrincipalAdapterExceptionWebserviceExceptionUnknowExceptionpublic List<CommonUser> getUsers(boolean showAll) throws AccessDeniedException, RepositoryException, DatabaseException, PrincipalAdapterException, UnknowException, WebserviceException
getUsers in interface BaseAuthAccessDeniedExceptionRepositoryExceptionDatabaseExceptionPrincipalAdapterExceptionUnknowExceptionWebserviceExceptionpublic CommonUser getUser(String userId) throws AccessDeniedException, RepositoryException, DatabaseException, PrincipalAdapterException, UnknowException, WebserviceException
getUser in interface BaseAuthAccessDeniedExceptionRepositoryExceptionDatabaseExceptionPrincipalAdapterExceptionUnknowExceptionWebserviceExceptionpublic List<CommonUser> getUsersByRole(String roleId) throws AccessDeniedException, RepositoryException, DatabaseException, PrincipalAdapterException, UnknowException, WebserviceException
getUsersByRole in interface BaseAuthAccessDeniedExceptionRepositoryExceptionDatabaseExceptionPrincipalAdapterExceptionUnknowExceptionWebserviceExceptionpublic void revokeRole(String uuid, String roleId, int permissions, boolean recursive) throws AccessDeniedException, RepositoryException, DatabaseException, PathNotFoundException, UnknowException, WebserviceException
revokeRole in interface BaseAuthAccessDeniedExceptionRepositoryExceptionDatabaseExceptionPathNotFoundExceptionUnknowExceptionWebserviceExceptionpublic void revokeUser(String uuid, String userId, int permissions, boolean recursive) throws AccessDeniedException, RepositoryException, DatabaseException, PathNotFoundException, UnknowException, WebserviceException
revokeUser in interface BaseAuthAccessDeniedExceptionRepositoryExceptionDatabaseExceptionPathNotFoundExceptionUnknowExceptionWebserviceExceptionpublic void grantRole(String uuid, String roleId, int permissions, boolean recursive) throws AccessDeniedException, RepositoryException, DatabaseException, PathNotFoundException, UnknowException, WebserviceException
grantRole in interface BaseAuthAccessDeniedExceptionRepositoryExceptionDatabaseExceptionPathNotFoundExceptionUnknowExceptionWebserviceExceptionpublic void grantUser(String uuid, String userId, int permissions, boolean recursive) throws AccessDeniedException, RepositoryException, DatabaseException, PathNotFoundException, UnknowException, WebserviceException
grantUser in interface BaseAuthAccessDeniedExceptionRepositoryExceptionDatabaseExceptionPathNotFoundExceptionUnknowExceptionWebserviceExceptionpublic void createUser(String userId, String password, String email, String name, boolean active) throws PrincipalAdapterException, UnknowException, WebserviceException
createUser in interface BaseAuthPrincipalAdapterExceptionUnknowExceptionWebserviceExceptionpublic void deleteUser(String userId) throws PrincipalAdapterException, UnknowException, WebserviceException
deleteUser in interface BaseAuthPrincipalAdapterExceptionUnknowExceptionWebserviceExceptionpublic void updateUser(String userId, String password, String email, String name, boolean active) throws PrincipalAdapterException, UnknowException, WebserviceException
updateUser in interface BaseAuthPrincipalAdapterExceptionUnknowExceptionWebserviceExceptionpublic void createRole(String roleId, boolean active) throws PrincipalAdapterException, UnknowException, WebserviceException
createRole in interface BaseAuthPrincipalAdapterExceptionUnknowExceptionWebserviceExceptionpublic void deleteRole(String roleId) throws PrincipalAdapterException, UnknowException, WebserviceException
deleteRole in interface BaseAuthPrincipalAdapterExceptionUnknowExceptionWebserviceExceptionpublic void updateRole(String roleId, boolean active) throws PrincipalAdapterException, UnknowException, WebserviceException
updateRole in interface BaseAuthPrincipalAdapterExceptionUnknowExceptionWebserviceExceptionpublic void assignRole(String userId, String roleId) throws PrincipalAdapterException, UnknowException, WebserviceException
assignRole in interface BaseAuthPrincipalAdapterExceptionUnknowExceptionWebserviceExceptionpublic void removeRole(String userId, String roleId) throws PrincipalAdapterException, UnknowException, WebserviceException
removeRole in interface BaseAuthPrincipalAdapterExceptionUnknowExceptionWebserviceExceptionpublic void changeSecurity(String uuid, ChangeSecurity changeSecurity) throws PathNotFoundException, AccessDeniedException, RepositoryException, DatabaseException, UnknowException, WebserviceException
changeSecurity in interface BaseAuthPathNotFoundExceptionAccessDeniedExceptionRepositoryExceptionDatabaseExceptionUnknowExceptionWebserviceExceptionpublic List<Profile> getProfiles(boolean filterByActive) throws PrincipalAdapterException, WebserviceException, UnknowException
getProfiles in interface BaseAuthPrincipalAdapterExceptionWebserviceExceptionUnknowExceptionpublic Profile getUserProfile(String userId) throws PrincipalAdapterException, WebserviceException, UnknowException
getUserProfile in interface BaseAuthPrincipalAdapterExceptionWebserviceExceptionUnknowExceptionpublic void setUserProfile(String userId, long profileId) throws PrincipalAdapterException, WebserviceException, UnknowException
setUserProfile in interface BaseAuthPrincipalAdapterExceptionWebserviceExceptionUnknowExceptionpublic void setUserPermissions(String uuid, String userId, int permissions, boolean recursive) throws AccessDeniedException, RepositoryException, DatabaseException, PathNotFoundException, UnknowException, WebserviceException
setUserPermissions in interface BaseAuthAccessDeniedExceptionRepositoryExceptionDatabaseExceptionPathNotFoundExceptionUnknowExceptionWebserviceExceptionpublic void setRolePermissions(String uuid, String roleId, int permissions, boolean recursive) throws AccessDeniedException, RepositoryException, DatabaseException, PathNotFoundException, UnknowException, WebserviceException
setRolePermissions in interface BaseAuthAccessDeniedExceptionRepositoryExceptionDatabaseExceptionPathNotFoundExceptionUnknowExceptionWebserviceExceptionpublic List<Tenant> getUserTenants() throws AccessDeniedException, RepositoryException, DatabaseException, PathNotFoundException, UnknowException, WebserviceException
getUserTenants in interface BaseAuthAccessDeniedExceptionRepositoryExceptionDatabaseExceptionPathNotFoundExceptionUnknowExceptionWebserviceExceptionpublic void setUserTenant(long tenantId)
throws AccessDeniedException,
RepositoryException,
DatabaseException,
PathNotFoundException,
UnknowException,
WebserviceException
setUserTenant in interface BaseAuthAccessDeniedExceptionRepositoryExceptionDatabaseExceptionPathNotFoundExceptionUnknowExceptionWebserviceExceptionpublic boolean isAdmin()
throws PrincipalAdapterException,
UnknowException,
WebserviceException
isAdmin in interface BaseAuthPrincipalAdapterExceptionUnknowExceptionWebserviceExceptionpublic boolean hasSecurityRecursive()
throws UnknowException,
WebserviceException
hasSecurityRecursive in interface BaseAuthUnknowExceptionWebserviceExceptionpublic boolean isLoginLowercase()
throws UnknowException,
WebserviceException
isLoginLowercase in interface BaseAuthUnknowExceptionWebserviceExceptionCopyright © 2020 Open Knowledge Management System S.L.. All Rights Reserved.