use of org.wso2.identity.integration.common.clients.entitlement.EntitlementServiceClient in project product-is by wso2.
the class EntitlementPIPAttributeCacheTestCase method testInit.
@BeforeClass(alwaysRun = true)
public void testInit() throws Exception {
super.init();
scm = new ServerConfigurationManager(isServer);
entitlementPolicyClient = new EntitlementPolicyServiceClient(backendURL, sessionCookie);
addPolicy();
addCustomAttributeFinder();
// call super init since server restart happens in previous step
super.init();
entitlementServiceClient = new EntitlementServiceClient(backendURL, sessionCookie);
}
use of org.wso2.identity.integration.common.clients.entitlement.EntitlementServiceClient in project carbon-apimgt by wso2.
the class XACMLAuthenticationInterceptor method isUserPermitted.
private boolean isUserPermitted(String userName, String resource, String httpMethod, String[] arr) {
try {
String status;
EntitlementServiceClient client = new EntitlementServiceClient();
status = client.validateAction(userName, resource, httpMethod, arr);
// TODO this permit need to be replaced with XACML constant for permitted.
if (status.equalsIgnoreCase("Permit")) {
return true;
}
} catch (Exception e) {
logger.error("Error while validating XACML request" + e);
}
return false;
}
use of org.wso2.identity.integration.common.clients.entitlement.EntitlementServiceClient in project product-is by wso2.
the class EntitlementServiceTestCase method testInit.
@BeforeClass(alwaysRun = true)
public void testInit() throws Exception {
super.init();
entitlementPolicyClient = new EntitlementPolicyServiceClient(backendURL, sessionCookie);
entitlementServiceClient = new EntitlementServiceClient(backendURL, sessionCookie);
userProfileMgtClient = new UserProfileMgtServiceClient(backendURL, sessionCookie);
}
Aggregations