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);
}
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);
}
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);
}
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();
}
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);
}
Aggregations