public interface AuthorizationManager
| Modifier and Type | Method and Description |
|---|---|
void |
authorizeRole(String roleName,
String resourceId,
String action)
Grants authorizes to a role to perform an action on a resource.
|
void |
authorizeUser(String userName,
String resourceId,
String action)
Deprecated.
|
void |
clearResourceAuthorizations(String resourceId)
Deletes all granted authorization on a resource.
|
void |
clearRoleActionOnAllResources(String roleName,
String action)
Deletes the role's right to perform the action on all resources.
|
void |
clearRoleAuthorization(String roleName)
Used when deleting roles.
|
void |
clearRoleAuthorization(String roleName,
String resourceId,
String action)
Deletes an already granted authorization of a role.
|
void |
clearUserAuthorization(String userName)
Deprecated.
|
void |
clearUserAuthorization(String userName,
String resourceId,
String action)
Deprecated.
|
void |
denyRole(String roleName,
String resourceId,
String action)
Deny authorizations to a role to perform an action on a resource.
|
void |
denyUser(String userName,
String resourceId,
String action)
Deprecated.
|
String[] |
getAllowedRolesForResource(String resourceId,
String action)
Retrieves a list of roles allowed to perform the given action on the
resource
|
String[] |
getAllowedUIResourcesForUser(String userName,
String permissionRootPath)
Returns the complete set of UI resources allowed for User.
|
String[] |
getDeniedRolesForResource(String resourceId,
String action)
Retrieves a list of roles that are not allowed to perform the given
action on the resource
|
String[] |
getExplicitlyAllowedUsersForResource(String resourceId,
String action)
Deprecated.
|
String[] |
getExplicitlyDeniedUsersForResource(String resourceId,
String action)
Deprecated.
|
int |
getTenantId()
This will get the tenant id associated with the user authorization
manager
|
boolean |
isRoleAuthorized(String roleName,
String resourceId,
String action)
Checks for role authorization.
|
boolean |
isUserAuthorized(String userName,
String resourceId,
String action)
Checks for user authorization.
|
void |
refreshAllowedRolesForResource(String resourceId)
This method used to refresh the existing resource permissions which cached in the memory
|
void |
resetPermissionOnUpdateRole(String roleName,
String newRoleName)
This will reset the permission of the renamed role
|
boolean isUserAuthorized(String userName, String resourceId, String action) throws UserStoreException
userName - The user nameresourceId - Resource Id Stringaction - The action user is trying to performUserStoreExceptionboolean isRoleAuthorized(String roleName, String resourceId, String action) throws UserStoreException
roleName - The role nameresourceId - Resource Id Stringaction - The action the role is trying to performUserStoreExceptionString[] getExplicitlyAllowedUsersForResource(String resourceId, String action) throws UserStoreException
resourceId - Resource Id Stringaction - The action that is allowed to performUserStoreExceptionString[] getAllowedRolesForResource(String resourceId, String action) throws UserStoreException
resourceId - Resource Id Stringaction - The action that is allowed to performUserStoreExceptionString[] getDeniedRolesForResource(String resourceId, String action) throws UserStoreException
resourceId - Resource Id Stringaction - The action that is allowed to performUserStoreExceptionString[] getExplicitlyDeniedUsersForResource(String resourceId, String action) throws UserStoreException
resourceId - Resource Id Stringaction - The action that is disallowed to performUserStoreExceptionvoid authorizeUser(String userName, String resourceId, String action) throws UserStoreException
userName - The user nameresourceId - Resource identification stringaction - The action granted to the userUserStoreExceptionvoid authorizeRole(String roleName, String resourceId, String action) throws UserStoreException
roleName - The role nameresourceId - Resource identification stringaction - The action granted to the roleUserStoreExceptionvoid denyUser(String userName, String resourceId, String action) throws UserStoreException
userName - The user nameresourceId - Resource identification stringaction - The action granted to the userUserStoreExceptionvoid denyRole(String roleName, String resourceId, String action) throws UserStoreException
roleName - The role nameresourceId - Resource identification stringaction - The action granted to the roleUserStoreExceptionvoid clearUserAuthorization(String userName, String resourceId, String action) throws UserStoreException
userName - The user nameresourceId - Resource identification stringaction - The action grantedUserStoreExceptionvoid clearUserAuthorization(String userName) throws UserStoreException
userName - The user nameUserStoreExceptionvoid clearRoleAuthorization(String roleName, String resourceId, String action) throws UserStoreException
roleName - The role nameresourceId - Resource identification stringaction - The action grantedUserStoreExceptionvoid clearRoleActionOnAllResources(String roleName, String action) throws UserStoreException
roleName - The role nameaction - The action grantedUserStoreExceptionvoid clearRoleAuthorization(String roleName) throws UserStoreException
roleName - UserStoreExceptionvoid clearResourceAuthorizations(String resourceId) throws UserStoreException
resourceId - Resource identification stringUserStoreExceptionString[] getAllowedUIResourcesForUser(String userName, String permissionRootPath) throws UserStoreException
userName - UserStoreExceptionint getTenantId()
throws UserStoreException
UserStoreException - if the operation failedvoid resetPermissionOnUpdateRole(String roleName, String newRoleName) throws UserStoreException
roleName - The role namenewRoleName - The new role nameUserStoreExceptionvoid refreshAllowedRolesForResource(String resourceId) throws UserStoreException
resourceId - resource id pathUserStoreException - if something went wrongCopyright © 2018 WSO2 Inc. All rights reserved.