Search in sources :

Example 6 with EntitlementPolicyServiceClient

use of org.wso2.identity.integration.common.clients.entitlement.EntitlementPolicyServiceClient in project product-is by wso2.

the class EntitlementJSONSupportMultiDecisionProfileTestCase method destroy.

@AfterClass(alwaysRun = true)
public void destroy() throws Exception {
    // Remove added policy
    entitlementPolicyClient = new EntitlementPolicyServiceClient(backendURL, sessionCookie);
    remoteUserStoreManagerServiceClient = new RemoteUserStoreManagerServiceClient(backendURL, sessionCookie);
    entitlementPolicyClient.enableDisablePolicy(POLICY_ID, false);
    entitlementPolicyClient.removePolicy(POLICY_ID);
    remoteUserStoreManagerServiceClient.deleteUser("adminUser");
    remoteUserStoreManagerServiceClient.deleteUser("publicUser");
    remoteUserStoreManagerServiceClient.deleteUser("localUser");
}
Also used : RemoteUserStoreManagerServiceClient(org.wso2.identity.integration.common.clients.usermgt.remote.RemoteUserStoreManagerServiceClient) EntitlementPolicyServiceClient(org.wso2.identity.integration.common.clients.entitlement.EntitlementPolicyServiceClient) AfterClass(org.testng.annotations.AfterClass)

Example 7 with EntitlementPolicyServiceClient

use of org.wso2.identity.integration.common.clients.entitlement.EntitlementPolicyServiceClient in project product-is by wso2.

the class EntitlementNotificationTestCase method testInit.

@BeforeClass(alwaysRun = true)
public void testInit() throws Exception {
    super.init();
    changeISConfiguration();
    super.init();
    entitlementPolicyClient = new EntitlementPolicyServiceClient(backendURL, sessionCookie);
    userMgtServiceClient = new UserManagementClient(backendURL, sessionCookie);
}
Also used : UserManagementClient(org.wso2.identity.integration.common.clients.UserManagementClient) EntitlementPolicyServiceClient(org.wso2.identity.integration.common.clients.entitlement.EntitlementPolicyServiceClient) BeforeClass(org.testng.annotations.BeforeClass)

Example 8 with EntitlementPolicyServiceClient

use of org.wso2.identity.integration.common.clients.entitlement.EntitlementPolicyServiceClient in project product-is by wso2.

the class EntitlementPolicyAdminServiceTestCase method testInit.

@BeforeClass(alwaysRun = true)
public void testInit() throws Exception {
    super.init();
    entitlementPolicyClient = new EntitlementPolicyServiceClient(backendURL, sessionCookie);
}
Also used : EntitlementPolicyServiceClient(org.wso2.identity.integration.common.clients.entitlement.EntitlementPolicyServiceClient) BeforeClass(org.testng.annotations.BeforeClass)

Example 9 with EntitlementPolicyServiceClient

use of org.wso2.identity.integration.common.clients.entitlement.EntitlementPolicyServiceClient 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);
}
Also used : UserProfileMgtServiceClient(org.wso2.identity.integration.common.clients.UserProfileMgtServiceClient) EntitlementServiceClient(org.wso2.identity.integration.common.clients.entitlement.EntitlementServiceClient) EntitlementPolicyServiceClient(org.wso2.identity.integration.common.clients.entitlement.EntitlementPolicyServiceClient) BeforeClass(org.testng.annotations.BeforeClass)

Example 10 with EntitlementPolicyServiceClient

use of org.wso2.identity.integration.common.clients.entitlement.EntitlementPolicyServiceClient in project product-is by wso2.

the class ApplicationAuthzTenantTestCase method testInit.

@BeforeClass(alwaysRun = true)
public void testInit() throws Exception {
    super.init(TestUserMode.TENANT_ADMIN);
    ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, null);
    applicationManagementServiceClient = new ApplicationManagementServiceClient(sessionCookie, backendURL, configContext);
    ssoConfigServiceClient = new SAMLSSOConfigServiceClient(backendURL, sessionCookie);
    remoteUSMServiceClient = new RemoteUserStoreManagerServiceClient(backendURL, sessionCookie);
    entitlementPolicyClient = new EntitlementPolicyServiceClient(backendURL, sessionCookie);
    httpClientAzUser = HttpClientBuilder.create().setDefaultCookieStore(new BasicCookieStore()).build();
    httpClientNonAzUser = HttpClientBuilder.create().setDefaultCookieStore(new BasicCookieStore()).build();
    createRole(AZ_TEST_TENANT_ROLE);
    createUser(AZ_TEST_TENANT_USER, AZ_TEST_TENANT_USER_PW, new String[] { AZ_TEST_TENANT_ROLE });
    userId = UserUtil.getUserId(MultitenantUtils.getTenantAwareUsername(AZ_TEST_TENANT_USER), isServer.getContextTenant());
    createUser(NON_AZ_TEST_TENANT_USER, NON_AZ_TEST_TENANT_USER_PW, new String[0]);
    createApplication(APPLICATION_NAME);
    createSAMLApp(APPLICATION_NAME, true, false, false);
    setupXACMLPolicy(POLICY_ID, POLICY);
}
Also used : ConfigurationContext(org.apache.axis2.context.ConfigurationContext) BasicCookieStore(org.apache.http.impl.client.BasicCookieStore) ApplicationManagementServiceClient(org.wso2.identity.integration.common.clients.application.mgt.ApplicationManagementServiceClient) SAMLSSOConfigServiceClient(org.wso2.identity.integration.common.clients.sso.saml.SAMLSSOConfigServiceClient) RemoteUserStoreManagerServiceClient(org.wso2.identity.integration.common.clients.usermgt.remote.RemoteUserStoreManagerServiceClient) EntitlementPolicyServiceClient(org.wso2.identity.integration.common.clients.entitlement.EntitlementPolicyServiceClient) BeforeClass(org.testng.annotations.BeforeClass)

Aggregations

EntitlementPolicyServiceClient (org.wso2.identity.integration.common.clients.entitlement.EntitlementPolicyServiceClient)11 BeforeClass (org.testng.annotations.BeforeClass)9 RemoteUserStoreManagerServiceClient (org.wso2.identity.integration.common.clients.usermgt.remote.RemoteUserStoreManagerServiceClient)4 ConfigurationContext (org.apache.axis2.context.ConfigurationContext)2 BasicCookieStore (org.apache.http.impl.client.BasicCookieStore)2 AfterClass (org.testng.annotations.AfterClass)2 ApplicationManagementServiceClient (org.wso2.identity.integration.common.clients.application.mgt.ApplicationManagementServiceClient)2 EntitlementServiceClient (org.wso2.identity.integration.common.clients.entitlement.EntitlementServiceClient)2 SAMLSSOConfigServiceClient (org.wso2.identity.integration.common.clients.sso.saml.SAMLSSOConfigServiceClient)2 File (java.io.File)1 PolicyDTO (org.wso2.carbon.identity.entitlement.stub.dto.PolicyDTO)1 ServerConfigurationManager (org.wso2.carbon.integration.common.utils.mgt.ServerConfigurationManager)1 UserManagementClient (org.wso2.identity.integration.common.clients.UserManagementClient)1 UserProfileMgtServiceClient (org.wso2.identity.integration.common.clients.UserProfileMgtServiceClient)1