Search in sources :

Example 1 with UserIdentityManagementAdminServiceClient

use of org.wso2.identity.integration.common.clients.mgt.UserIdentityManagementAdminServiceClient in project product-is by wso2.

the class UserIdentityManagementServiceTestCase method testInit.

@SetEnvironment(executionEnvironments = { ExecutionEnvironment.ALL })
@BeforeClass(alwaysRun = true)
public void testInit() throws Exception {
    super.init();
    changeISConfiguration();
    super.init();
    timeBeforeUserLogin = System.currentTimeMillis();
    loginManger = new AuthenticatorClient(backendURL);
    userMgtClient = new UserManagementClient(backendURL, sessionCookie);
    userIdentityManagementAdminServiceClient = new UserIdentityManagementAdminServiceClient(backendURL, sessionCookie);
    Thread.sleep(5000);
    loginManger.login(isServer.getSuperTenant().getTenantAdmin().getUserName(), isServer.getSuperTenant().getTenantAdmin().getPassword(), isServer.getInstance().getHosts().get("default"));
    remoteUSMServiceClient = new RemoteUserStoreManagerServiceClient(backendURL, sessionCookie);
    remoteUSMServiceClient.addUser(TEST_USER_USERNAME, TEST_USER_PASSWORD, null, null, PROFILE_NAME, false);
    userMgtClient.addRole(TEST_ROLE, new String[] { TEST_USER_USERNAME }, new String[] { "/permission/admin/login" }, false);
}
Also used : AuthenticatorClient(org.wso2.carbon.integration.common.admin.client.AuthenticatorClient) UserIdentityManagementAdminServiceClient(org.wso2.identity.integration.common.clients.mgt.UserIdentityManagementAdminServiceClient) UserManagementClient(org.wso2.identity.integration.common.clients.UserManagementClient) RemoteUserStoreManagerServiceClient(org.wso2.identity.integration.common.clients.usermgt.remote.RemoteUserStoreManagerServiceClient) BeforeClass(org.testng.annotations.BeforeClass) SetEnvironment(org.wso2.carbon.automation.engine.annotations.SetEnvironment)

Aggregations

BeforeClass (org.testng.annotations.BeforeClass)1 SetEnvironment (org.wso2.carbon.automation.engine.annotations.SetEnvironment)1 AuthenticatorClient (org.wso2.carbon.integration.common.admin.client.AuthenticatorClient)1 UserManagementClient (org.wso2.identity.integration.common.clients.UserManagementClient)1 UserIdentityManagementAdminServiceClient (org.wso2.identity.integration.common.clients.mgt.UserIdentityManagementAdminServiceClient)1 RemoteUserStoreManagerServiceClient (org.wso2.identity.integration.common.clients.usermgt.remote.RemoteUserStoreManagerServiceClient)1