use of org.wso2.identity.scenarios.commons.clients.UserManagementClient in project product-is by wso2.
the class ManageInternalRolesWithPermissionTestCase method testInit.
@BeforeClass(alwaysRun = true)
public void testInit() throws Exception {
super.init();
loginAndObtainSessionCookie();
userManagementClient = new UserManagementClient(backendServiceURL, sessionCookie);
}
use of org.wso2.identity.scenarios.commons.clients.UserManagementClient in project product-is by wso2.
the class ProvisioningTestCase method createServiceClientsForServers.
private void createServiceClientsForServers(String sessionCookie, int portOffset, CommonConstants.AdminClients[] adminClients) throws Exception {
if (adminClients == null) {
return;
}
// TODO: Need to remove getSecureServiceUrl method when server start issue got fixed / TAF 4.3.1
String serviceUrl = getSecureServiceUrl(portOffset, automationContextMap.get(portOffset).getContextUrls().getSecureServiceUrl());
if (sessionCookie == null) {
AuthenticatorClient authenticatorClient = new AuthenticatorClient(serviceUrl);
sessionCookie = authenticatorClient.login(automationContextMap.get(portOffset).getSuperTenant().getTenantAdmin().getUserName(), automationContextMap.get(portOffset).getSuperTenant().getTenantAdmin().getPassword(), automationContextMap.get(portOffset).getDefaultInstance().getHosts().get("default"));
if (sessionCookie == null) {
throw new Exception("Unable to login to the server instance : " + automationContextMap.get(portOffset).getInstance().getName());
}
}
ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, null);
for (CommonConstants.AdminClients client : adminClients) {
if (CommonConstants.AdminClients.APPLICATION_MANAGEMENT_SERVICE_CLIENT.equals(client)) {
applicationManagementServiceClients.put(portOffset, new ApplicationManagementServiceClient(sessionCookie, serviceUrl, configContext));
} else if (CommonConstants.AdminClients.IDENTITY_PROVIDER_MGT_SERVICE_CLIENT.equals(client)) {
identityProviderMgtServiceClients.put(portOffset, new IdentityProviderMgtServiceClient(sessionCookie, serviceUrl));
} else if (CommonConstants.AdminClients.USER_MANAGEMENT_CLIENT.equals(client)) {
userMgtServiceClients.put(portOffset, new UserManagementClient(serviceUrl, sessionCookie));
}
}
}
use of org.wso2.identity.scenarios.commons.clients.UserManagementClient in project product-is by wso2.
the class ApplicationManagementTestCase method testInit.
@BeforeClass(alwaysRun = true)
public void testInit() throws Exception {
super.init();
loginAndObtainSessionCookie();
applicationManagementServiceClient = new ApplicationManagementServiceClient(sessionCookie, backendServiceURL, configContext);
userMgtClient = new UserManagementClient(backendServiceURL, sessionCookie);
userMgtClient.addRole(IDP_ROLE_1, new String[0], new String[] { PERMISSION_ADMIN_LOGIN });
identityProviderMgtServiceClient = new IdentityProviderMgtServiceClient(sessionCookie, backendServiceURL);
claimMetadataManagementServiceClient = new ClaimMetadataManagementServiceClient(backendServiceURL, sessionCookie);
populateData();
}
use of org.wso2.identity.scenarios.commons.clients.UserManagementClient in project product-is by wso2.
the class ProvisionUserWithAdminRights method testInit.
@BeforeClass(alwaysRun = true)
public void testInit() throws Exception {
super.init();
loginAndObtainSessionCookie();
userManagementClient = new UserManagementClient(backendServiceURL, sessionCookie);
}
use of org.wso2.identity.scenarios.commons.clients.UserManagementClient in project product-is by wso2.
the class ManagePrimaryRolesWithPermissionTestCase method testInit.
@BeforeClass(alwaysRun = true)
public void testInit() throws Exception {
super.init();
loginAndObtainSessionCookie();
userManagementClient = new UserManagementClient(backendServiceURL, sessionCookie);
}
Aggregations