use of org.wso2.identity.integration.common.clients.mgt.IdentityGovernanceServiceClient 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);
}
use of org.wso2.identity.integration.common.clients.mgt.IdentityGovernanceServiceClient in project product-is by wso2.
the class AdminForcedPasswordResetTestCase method selectPasswordResetOption.
protected void selectPasswordResetOption(String option) throws Exception {
identityGovernanceServiceClient = new IdentityGovernanceServiceClient(sessionCookie, backendURL);
Thread.sleep(5000);
loginManger.login(isServer.getSuperTenant().getTenantAdmin().getUserName(), isServer.getSuperTenant().getTenantAdmin().getPassword(), isServer.getInstance().getHosts().get(DEFAULT));
Property[] newProperties = new Property[3];
Property prop = new Property();
prop.setName(option);
prop.setValue(TRUE_STRING);
Property prop1 = new Property();
prop1.setName(ENABLE_ADMIN_PASSWORD_RESET_WITH_RECOVERY_LINK);
prop1.setValue("false");
Property prop2 = new Property();
prop2.setName(ENABLE_NOTIFICATION_BASED_PASSWORD_RECOVERY);
prop2.setValue(TRUE_STRING);
newProperties[0] = prop;
newProperties[1] = prop1;
newProperties[2] = prop2;
identityGovernanceServiceClient.updateConfigurations(newProperties);
}
use of org.wso2.identity.integration.common.clients.mgt.IdentityGovernanceServiceClient in project product-is by wso2.
the class AccountLockEnabledTestCase method enableAccountLocking.
protected void enableAccountLocking(String option) throws Exception {
identityGovernanceServiceClient = new IdentityGovernanceServiceClient(sessionCookie, backendURL);
Thread.sleep(5000);
authenticatorClient.login(isServer.getSuperTenant().getTenantAdmin().getUserName(), isServer.getSuperTenant().getTenantAdmin().getPassword(), isServer.getInstance().getHosts().get(DEFAULT));
Property[] newProperties = new Property[1];
Property prop = new Property();
prop.setName(option);
prop.setValue(TRUE_STRING);
newProperties[0] = prop;
identityGovernanceServiceClient.updateConfigurations(newProperties);
}
use of org.wso2.identity.integration.common.clients.mgt.IdentityGovernanceServiceClient in project product-is by wso2.
the class IdentityGovernanceTestCase method testInit.
@BeforeClass(alwaysRun = true)
public void testInit() throws Exception {
super.init();
identityGovernanceServiceClient = new IdentityGovernanceServiceClient(sessionCookie, backendURL);
}
use of org.wso2.identity.integration.common.clients.mgt.IdentityGovernanceServiceClient in project product-is by wso2.
the class PasswordHistoryValidationTestCase method testInit.
@SetEnvironment(executionEnvironments = { ExecutionEnvironment.ALL })
@BeforeClass(alwaysRun = true)
public void testInit() throws Exception {
super.init();
loginManger = new AuthenticatorClient(backendURL);
userMgtClient = new UserManagementClient(backendURL, sessionCookie);
identityGovernanceServiceClient = new IdentityGovernanceServiceClient(sessionCookie, backendURL);
Thread.sleep(5000);
loginManger.login(isServer.getSuperTenant().getTenantAdmin().getUserName(), isServer.getSuperTenant().getTenantAdmin().getPassword(), isServer.getInstance().getHosts().get("default"));
Property[] newProperties = new Property[1];
Property prop = new Property();
prop.setName("passwordHistory.enable");
prop.setValue("true");
newProperties[0] = prop;
identityGovernanceServiceClient.updateConfigurations(newProperties);
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);
}
Aggregations