use of org.wso2.identity.integration.common.clients.sso.saml.SAMLSSOConfigServiceClient in project product-is by wso2.
the class RegistryMountTestCase method testInit.
@BeforeClass(alwaysRun = true)
public void testInit() throws Exception {
super.init();
logManger = new AuthenticatorClient(backendURL);
serverConfigurationManager = new ServerConfigurationManager(isServer);
tenantServiceClient = new TenantManagementServiceClient(isServer.getContextUrls().getBackEndUrl(), sessionCookie);
tenantServiceClient.addTenant(TENANT_DOMAIN, TENANT_ADMIN_TENANT_AWARE_USERNAME, TENANT_ADMIN_PASSWORD, TENANT_ADMIN_USERNAME, "Registry", "Mount");
sessionCookie = this.logManger.login(TENANT_ADMIN_USERNAME, TENANT_ADMIN_PASSWORD, isServer.getInstance().getHosts().get(profileName));
configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, null);
applicationManagementServiceClient = new ApplicationManagementServiceClient(sessionCookie, backendURL, configContext);
ssoConfigServiceClient = new SAMLSSOConfigServiceClient(backendURL, sessionCookie);
httpClient = new DefaultHttpClient();
createApplication();
ssoConfigServiceClient.addServiceProvider(createSsoServiceProviderDTO());
userId = UserUtil.getUserId(MultitenantUtils.getTenantAwareUsername(TENANT_ADMIN_USERNAME), TENANT_DOMAIN, TENANT_ADMIN_USERNAME, TENANT_ADMIN_PASSWORD);
}
use of org.wso2.identity.integration.common.clients.sso.saml.SAMLSSOConfigServiceClient in project product-is by wso2.
the class ConditionalAuthenticationTestCase method startSecondaryIS.
private void startSecondaryIS() throws Exception {
AutomationContext context = testDataHolder.getAutomationContext();
String serviceUrl = (context.getContextUrls().getSecureServiceUrl()).replace("9853", String.valueOf(IS_DEFAULT_HTTPS_PORT + PORT_OFFSET_1)) + "/";
AuthenticatorClient authenticatorClient = new AuthenticatorClient(serviceUrl);
sessionCookie = authenticatorClient.login(context.getSuperTenant().getTenantAdmin().getUserName(), context.getSuperTenant().getTenantAdmin().getPassword(), context.getDefaultInstance().getHosts().get("default"));
if (sessionCookie != null) {
ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, null);
applicationManagementServiceClient2 = new ApplicationManagementServiceClient(sessionCookie, serviceUrl, configContext);
samlSSOConfigServiceClient = new SAMLSSOConfigServiceClient(serviceUrl, sessionCookie);
}
}
use of org.wso2.identity.integration.common.clients.sso.saml.SAMLSSOConfigServiceClient in project product-is by wso2.
the class ApplicationAuthzTenantTestCase method testInit.
@BeforeClass(alwaysRun = true)
public void testInit() throws Exception {
super.init(TestUserMode.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_TENANT_ROLE);
createUser(AZ_TEST_TENANT_USER, AZ_TEST_TENANT_USER_PW, new String[] { AZ_TEST_TENANT_ROLE });
userId = UserUtil.getUserId(MultitenantUtils.getTenantAwareUsername(AZ_TEST_TENANT_USER), isServer.getContextTenant());
createUser(NON_AZ_TEST_TENANT_USER, NON_AZ_TEST_TENANT_USER_PW, new String[0]);
createApplication(APPLICATION_NAME);
createSAMLApp(APPLICATION_NAME, true, false, false);
setupXACMLPolicy(POLICY_ID, POLICY);
}
use of org.wso2.identity.integration.common.clients.sso.saml.SAMLSSOConfigServiceClient in project product-is by wso2.
the class EmailOTPTestCase method testInit.
@BeforeClass(alwaysRun = true)
public void testInit() throws Exception {
super.init();
changeISConfiguration();
// Re-initiating after the restart.
super.init(config.getUserMode());
ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, null);
applicationManagementServiceClient = new ApplicationManagementServiceClient(sessionCookie, backendURL, configContext);
ssoConfigServiceClient = new SAMLSSOConfigServiceClient(backendURL, sessionCookie);
identityProviderMgtServiceClient = new IdentityProviderMgtServiceClient(sessionCookie, backendURL, configContext);
remoteUSMServiceClient = new RemoteUserStoreManagerServiceClient(backendURL, sessionCookie);
httpClient = HttpClientBuilder.create().setDefaultCookieStore(new BasicCookieStore()).build();
createUser();
createApplication();
}
use of org.wso2.identity.integration.common.clients.sso.saml.SAMLSSOConfigServiceClient in project product-is by wso2.
the class AbstractAnalyticsLoginTestCase method testInit.
public void testInit() throws Exception {
super.init(config.getUserMode());
ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, null);
applicationManagementServiceClient = new ApplicationManagementServiceClient(sessionCookie, backendURL, configContext);
ssoConfigServiceClient = new SAMLSSOConfigServiceClient(backendURL, sessionCookie);
remoteUSMServiceClient = new RemoteUserStoreManagerServiceClient(backendURL, sessionCookie);
createUser();
createApplication();
}
Aggregations