org.wso2.carbon.identity.common.testng.realm
Class MockAuthorizationManager
- java.lang.Object
-
- org.wso2.carbon.identity.common.testng.realm.MockAuthorizationManager
-
- All Implemented Interfaces:
- org.wso2.carbon.user.api.AuthorizationManager
public class MockAuthorizationManager extends Object implements org.wso2.carbon.user.core.AuthorizationManager
Simple In Memory Authorization Manager for mocking.
-
Constructor Summary
Constructors Constructor and Description MockAuthorizationManager()
Method Summary
-
Method Detail
isUserAuthorized
public boolean isUserAuthorized(String s, String s1, String s2) throws org.wso2.carbon.user.core.UserStoreException
- Specified by:
-
isUserAuthorized
in interfaceorg.wso2.carbon.user.api.AuthorizationManager
- Throws:
-
org.wso2.carbon.user.core.UserStoreException
isRoleAuthorized
public boolean isRoleAuthorized(String s, String s1, String s2) throws org.wso2.carbon.user.core.UserStoreException
- Specified by:
-
isRoleAuthorized
in interfaceorg.wso2.carbon.user.api.AuthorizationManager
- Throws:
-
org.wso2.carbon.user.core.UserStoreException
getExplicitlyAllowedUsersForResource
public String[] getExplicitlyAllowedUsersForResource(String s, String s1) throws org.wso2.carbon.user.core.UserStoreException
- Specified by:
-
getExplicitlyAllowedUsersForResource
in interfaceorg.wso2.carbon.user.api.AuthorizationManager
- Throws:
-
org.wso2.carbon.user.core.UserStoreException
getAllowedRolesForResource
public String[] getAllowedRolesForResource(String s, String s1) throws org.wso2.carbon.user.core.UserStoreException
- Specified by:
-
getAllowedRolesForResource
in interfaceorg.wso2.carbon.user.api.AuthorizationManager
- Throws:
-
org.wso2.carbon.user.core.UserStoreException
getDeniedRolesForResource
public String[] getDeniedRolesForResource(String s, String s1) throws org.wso2.carbon.user.core.UserStoreException
- Specified by:
-
getDeniedRolesForResource
in interfaceorg.wso2.carbon.user.api.AuthorizationManager
- Throws:
-
org.wso2.carbon.user.core.UserStoreException
getExplicitlyDeniedUsersForResource
public String[] getExplicitlyDeniedUsersForResource(String s, String s1) throws org.wso2.carbon.user.core.UserStoreException
- Specified by:
-
getExplicitlyDeniedUsersForResource
in interfaceorg.wso2.carbon.user.api.AuthorizationManager
- Throws:
-
org.wso2.carbon.user.core.UserStoreException
authorizeUser
public void authorizeUser(String s, String s1, String s2) throws org.wso2.carbon.user.core.UserStoreException
- Specified by:
-
authorizeUser
in interfaceorg.wso2.carbon.user.api.AuthorizationManager
- Throws:
-
org.wso2.carbon.user.core.UserStoreException
authorizeRole
public void authorizeRole(String s, String s1, String s2) throws org.wso2.carbon.user.core.UserStoreException
- Specified by:
-
authorizeRole
in interfaceorg.wso2.carbon.user.api.AuthorizationManager
- Throws:
-
org.wso2.carbon.user.core.UserStoreException
denyUser
public void denyUser(String s, String s1, String s2) throws org.wso2.carbon.user.core.UserStoreException
- Specified by:
-
denyUser
in interfaceorg.wso2.carbon.user.api.AuthorizationManager
- Throws:
-
org.wso2.carbon.user.core.UserStoreException
denyRole
public void denyRole(String s, String s1, String s2) throws org.wso2.carbon.user.core.UserStoreException
- Specified by:
-
denyRole
in interfaceorg.wso2.carbon.user.api.AuthorizationManager
- Throws:
-
org.wso2.carbon.user.core.UserStoreException
clearUserAuthorization
public void clearUserAuthorization(String s, String s1, String s2) throws org.wso2.carbon.user.core.UserStoreException
- Specified by:
-
clearUserAuthorization
in interfaceorg.wso2.carbon.user.api.AuthorizationManager
- Throws:
-
org.wso2.carbon.user.core.UserStoreException
clearUserAuthorization
public void clearUserAuthorization(String s) throws org.wso2.carbon.user.core.UserStoreException
- Specified by:
-
clearUserAuthorization
in interfaceorg.wso2.carbon.user.api.AuthorizationManager
- Throws:
-
org.wso2.carbon.user.core.UserStoreException
clearRoleAuthorization
public void clearRoleAuthorization(String s, String s1, String s2) throws org.wso2.carbon.user.core.UserStoreException
- Specified by:
-
clearRoleAuthorization
in interfaceorg.wso2.carbon.user.api.AuthorizationManager
- Throws:
-
org.wso2.carbon.user.core.UserStoreException
clearRoleActionOnAllResources
public void clearRoleActionOnAllResources(String s, String s1) throws org.wso2.carbon.user.core.UserStoreException
- Specified by:
-
clearRoleActionOnAllResources
in interfaceorg.wso2.carbon.user.api.AuthorizationManager
- Throws:
-
org.wso2.carbon.user.core.UserStoreException
clearRoleAuthorization
public void clearRoleAuthorization(String s) throws org.wso2.carbon.user.core.UserStoreException
- Specified by:
-
clearRoleAuthorization
in interfaceorg.wso2.carbon.user.api.AuthorizationManager
- Throws:
-
org.wso2.carbon.user.core.UserStoreException
clearResourceAuthorizations
public void clearResourceAuthorizations(String s) throws org.wso2.carbon.user.core.UserStoreException
- Specified by:
-
clearResourceAuthorizations
in interfaceorg.wso2.carbon.user.api.AuthorizationManager
- Throws:
-
org.wso2.carbon.user.core.UserStoreException
getAllowedUIResourcesForUser
public String[] getAllowedUIResourcesForUser(String s, String s1) throws org.wso2.carbon.user.core.UserStoreException
- Specified by:
-
getAllowedUIResourcesForUser
in interfaceorg.wso2.carbon.user.api.AuthorizationManager
- Throws:
-
org.wso2.carbon.user.core.UserStoreException
getTenantId
public int getTenantId() throws org.wso2.carbon.user.core.UserStoreException
- Specified by:
-
getTenantId
in interfaceorg.wso2.carbon.user.api.AuthorizationManager
- Throws:
-
org.wso2.carbon.user.core.UserStoreException
resetPermissionOnUpdateRole
public void resetPermissionOnUpdateRole(String s, String s1) throws org.wso2.carbon.user.core.UserStoreException
- Specified by:
-
resetPermissionOnUpdateRole
in interfaceorg.wso2.carbon.user.api.AuthorizationManager
- Throws:
-
org.wso2.carbon.user.core.UserStoreException
refreshAllowedRolesForResource
public void refreshAllowedRolesForResource(String s) throws org.wso2.carbon.user.api.UserStoreException
- Specified by:
-
refreshAllowedRolesForResource
in interfaceorg.wso2.carbon.user.api.AuthorizationManager
- Throws:
-
org.wso2.carbon.user.api.UserStoreException
Copyright © 2018 WSO2. All rights reserved.