Search in sources :

Example 1 with RemoteUserStoreManagerServiceClient

use of org.wso2.identity.integration.common.clients.usermgt.remote.RemoteUserStoreManagerServiceClient in project product-is by wso2.

the class ApplicationAuthzTestCase method testInit.

@BeforeClass(alwaysRun = true)
public void testInit() throws Exception {
    super.init(TestUserMode.SUPER_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_ROLE);
    createUser(AZ_TEST_USER, AZ_TEST_USER_PW, new String[] { AZ_TEST_ROLE });
    userId = UserUtil.getUserId(MultitenantUtils.getTenantAwareUsername(AZ_TEST_USER), isServer.getContextTenant());
    createUser(NON_AZ_TEST_USER, NON_AZ_TEST_USER_PW, new String[0]);
    createApplication(APPLICATION_NAME);
    createSAMLApp(APPLICATION_NAME, true, true, true);
    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)

Example 2 with RemoteUserStoreManagerServiceClient

use of org.wso2.identity.integration.common.clients.usermgt.remote.RemoteUserStoreManagerServiceClient in project product-is by wso2.

the class AccountLockWhileCaseInsensitiveUserFalseTestCase method testInit.

@BeforeClass(alwaysRun = true)
public void testInit() throws Exception {
    super.init();
    String carbonHome = Utils.getResidentCarbonHome();
    configureServerWithRestart(carbonHome);
    // Initiating after the restart.
    super.init();
    usmServiceClient = new RemoteUserStoreManagerServiceClient(backendURL, sessionCookie);
    createLockedUser(TEST_USER_1, new String[] { ROLE_ADMIN }, TEST_USER_1_PASSWORD);
    authClient = new AuthenticatorClient(backendURL);
}
Also used : AuthenticatorClient(org.wso2.carbon.integration.common.admin.client.AuthenticatorClient) RemoteUserStoreManagerServiceClient(org.wso2.identity.integration.common.clients.usermgt.remote.RemoteUserStoreManagerServiceClient) BeforeClass(org.testng.annotations.BeforeClass)

Example 3 with RemoteUserStoreManagerServiceClient

use of org.wso2.identity.integration.common.clients.usermgt.remote.RemoteUserStoreManagerServiceClient 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)

Example 4 with RemoteUserStoreManagerServiceClient

use of org.wso2.identity.integration.common.clients.usermgt.remote.RemoteUserStoreManagerServiceClient in project product-is by wso2.

the class ChallengeQuestionManagementAdminServiceTestCase method testInit.

@BeforeClass(alwaysRun = true)
public void testInit() throws Exception {
    super.init();
    loginManger = new AuthenticatorClient(backendURL);
    // login as super tenant admin
    loginManger.login(isServer.getSuperTenant().getTenantAdmin().getUserName(), isServer.getSuperTenant().getTenantAdmin().getPassword(), isServer.getInstance().getHosts().get("default"));
    userMgtClient = new UserManagementClient(backendURL, sessionCookie);
    remoteUSMServiceClient = new RemoteUserStoreManagerServiceClient(backendURL, sessionCookie);
    challengeQuestionsAdminClient = new ChallengeQuestionMgtAdminClient(backendURL, sessionCookie);
    challengeQuestionsBobClient = new ChallengeQuestionMgtAdminClient(backendURL, BOB_USERNAME, BOB_PASSWORD);
    createUsersAndRoles();
    setSystemproperties();
}
Also used : AuthenticatorClient(org.wso2.carbon.integration.common.admin.client.AuthenticatorClient) UserManagementClient(org.wso2.identity.integration.common.clients.UserManagementClient) RemoteUserStoreManagerServiceClient(org.wso2.identity.integration.common.clients.usermgt.remote.RemoteUserStoreManagerServiceClient) ChallengeQuestionMgtAdminClient(org.wso2.identity.integration.common.clients.challenge.questions.mgt.ChallengeQuestionMgtAdminClient) BeforeClass(org.testng.annotations.BeforeClass)

Example 5 with RemoteUserStoreManagerServiceClient

use of org.wso2.identity.integration.common.clients.usermgt.remote.RemoteUserStoreManagerServiceClient in project product-is by wso2.

the class OAuth2ServiceResourceOwnerTestCase method testInit.

@BeforeClass(alwaysRun = true)
public void testInit() throws Exception {
    backendURL = context.getContextUrls().getBackEndUrl();
    loginLogoutClient = new LoginLogoutClient(context);
    logManger = new AuthenticatorClient(backendURL);
    sessionCookie = logManger.login(username, userPassword, context.getInstance().getHosts().get("default"));
    identityContextUrls = context.getContextUrls();
    tenantInfo = context.getContextTenant();
    userInfo = tenantInfo.getContextUser();
    appMgtclient = new ApplicationManagementServiceClient(sessionCookie, backendURL, null);
    adminClient = new OauthAdminClient(backendURL, sessionCookie);
    remoteUSMServiceClient = new RemoteUserStoreManagerServiceClient(backendURL, sessionCookie);
    setSystemproperties();
    client = HttpClientBuilder.create().build();
    identityGovernanceServiceClient = new IdentityGovernanceServiceClient(sessionCookie, backendURL);
    createLockedUser(lockedUser, lockedUserPassword);
}
Also used : OauthAdminClient(org.wso2.identity.integration.common.clients.oauth.OauthAdminClient) LoginLogoutClient(org.wso2.carbon.integration.common.utils.LoginLogoutClient) AuthenticatorClient(org.wso2.carbon.integration.common.admin.client.AuthenticatorClient) ApplicationManagementServiceClient(org.wso2.identity.integration.common.clients.application.mgt.ApplicationManagementServiceClient) IdentityGovernanceServiceClient(org.wso2.identity.integration.common.clients.mgt.IdentityGovernanceServiceClient) RemoteUserStoreManagerServiceClient(org.wso2.identity.integration.common.clients.usermgt.remote.RemoteUserStoreManagerServiceClient) BeforeClass(org.testng.annotations.BeforeClass)

Aggregations

RemoteUserStoreManagerServiceClient (org.wso2.identity.integration.common.clients.usermgt.remote.RemoteUserStoreManagerServiceClient)36 BeforeClass (org.testng.annotations.BeforeClass)29 ApplicationManagementServiceClient (org.wso2.identity.integration.common.clients.application.mgt.ApplicationManagementServiceClient)16 AuthenticatorClient (org.wso2.carbon.integration.common.admin.client.AuthenticatorClient)15 ConfigurationContext (org.apache.axis2.context.ConfigurationContext)9 OauthAdminClient (org.wso2.identity.integration.common.clients.oauth.OauthAdminClient)8 SAMLSSOConfigServiceClient (org.wso2.identity.integration.common.clients.sso.saml.SAMLSSOConfigServiceClient)7 BasicCookieStore (org.apache.http.impl.client.BasicCookieStore)6 LoginLogoutClient (org.wso2.carbon.integration.common.utils.LoginLogoutClient)6 UserManagementClient (org.wso2.identity.integration.common.clients.UserManagementClient)6 SetEnvironment (org.wso2.carbon.automation.engine.annotations.SetEnvironment)5 RemoteUserStoreManagerServiceClient (org.wso2.identity.scenarios.commons.clients.usermgt.remote.RemoteUserStoreManagerServiceClient)5 DefaultHttpClient (org.apache.http.impl.client.DefaultHttpClient)4 IdentityProviderMgtServiceClient (org.wso2.identity.integration.common.clients.Idp.IdentityProviderMgtServiceClient)4 EntitlementPolicyServiceClient (org.wso2.identity.integration.common.clients.entitlement.EntitlementPolicyServiceClient)4 Test (org.testng.annotations.Test)2 ServerConfigurationManager (org.wso2.carbon.integration.common.utils.mgt.ServerConfigurationManager)2 ClaimValue (org.wso2.carbon.um.ws.api.stub.ClaimValue)2 UserProfileMgtServiceClient (org.wso2.identity.integration.common.clients.UserProfileMgtServiceClient)2 IdentityGovernanceServiceClient (org.wso2.identity.integration.common.clients.mgt.IdentityGovernanceServiceClient)2