use of org.wso2.identity.integration.common.clients.sso.saml.SAMLSSOConfigServiceClient in project product-is by wso2.
the class SAMLWithRequestPathAuthenticationTest method testInit.
@BeforeClass(alwaysRun = true)
public void testInit() throws Exception {
super.init();
logManger = new AuthenticatorClient(backendURL);
adminUsername = userInfo.getUserName();
adminPassword = userInfo.getPassword();
logManger.login(isServer.getSuperTenant().getTenantAdmin().getUserName(), isServer.getSuperTenant().getTenantAdmin().getPassword(), isServer.getInstance().getHosts().get("default"));
appMgtclient = new ApplicationManagementServiceClient(sessionCookie, backendURL, null);
ssoConfigServiceClient = new SAMLSSOConfigServiceClient(backendURL, sessionCookie);
client = HttpClientBuilder.create().build();
isURL = backendURL.substring(0, backendURL.indexOf("services/"));
ssoConfigServiceClient.addServiceProvider(createSsoServiceProviderDTO());
serviceProvider = new ServiceProvider();
serviceProvider.setApplicationName(SERVICE_PROVIDER_NAME);
serviceProvider.setDescription(SERVICE_PROVIDER_Desc);
appMgtclient.createApplication(serviceProvider);
serviceProvider = appMgtclient.getApplication(SERVICE_PROVIDER_NAME);
InboundAuthenticationConfig inboundAuthenticationConfig = new InboundAuthenticationConfig();
InboundAuthenticationRequestConfig requestConfig = new InboundAuthenticationRequestConfig();
requestConfig.setInboundAuthKey("travelocity.com");
requestConfig.setInboundAuthType("samlsso");
Property attributeConsumerServiceIndexProp = new Property();
attributeConsumerServiceIndexProp.setName("attrConsumServiceIndex");
attributeConsumerServiceIndexProp.setValue("1239245949");
requestConfig.setProperties(new Property[] { attributeConsumerServiceIndexProp });
inboundAuthenticationConfig.setInboundAuthenticationRequestConfigs(new InboundAuthenticationRequestConfig[] { requestConfig });
serviceProvider.setInboundAuthenticationConfig(inboundAuthenticationConfig);
RequestPathAuthenticatorConfig requestPathAuthenticatorConfig = new RequestPathAuthenticatorConfig();
requestPathAuthenticatorConfig.setName("BasicAuthRequestPathAuthenticator");
serviceProvider.setRequestPathAuthenticatorConfigs(new RequestPathAuthenticatorConfig[] { requestPathAuthenticatorConfig });
appMgtclient.updateApplicationData(serviceProvider);
serviceProvider = appMgtclient.getApplication(SERVICE_PROVIDER_NAME);
}
use of org.wso2.identity.integration.common.clients.sso.saml.SAMLSSOConfigServiceClient in project product-is by wso2.
the class SAMLLocalAndOutboundAuthenticatorsTestCase method testInit.
@BeforeClass(alwaysRun = true)
public void testInit() throws Exception {
super.init(config.getUserMode());
changeISConfiguration();
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);
identityProviderMgtServiceClient = new IdentityProviderMgtServiceClient(sessionCookie, backendURL);
httpClient = HttpClientBuilder.create().setDefaultCookieStore(new BasicCookieStore()).build();
createIDP();
createUser();
createLocalAndOutBoundAuthenticator();
createApplication();
ssoConfigServiceClient.addServiceProvider(getSsoServiceProviderDTO());
}
use of org.wso2.identity.integration.common.clients.sso.saml.SAMLSSOConfigServiceClient in project product-is by wso2.
the class SPMetaDataTenantTestCase method init.
@BeforeClass(alwaysRun = true)
public void init() throws Exception {
super.init(TestUserMode.TENANT_ADMIN);
ssoConfigServiceClient = new SAMLSSOConfigServiceClient(backendURL, ADMIN_USERNAME, ADMIN_PASSWORD);
}
use of org.wso2.identity.integration.common.clients.sso.saml.SAMLSSOConfigServiceClient in project product-is by wso2.
the class SPMetadataTestCase method init.
@BeforeClass
public void init() throws Exception {
super.init(TestUserMode.SUPER_TENANT_ADMIN);
ssoConfigServiceClient = new SAMLSSOConfigServiceClient(backendURL, sessionCookie);
}
use of org.wso2.identity.integration.common.clients.sso.saml.SAMLSSOConfigServiceClient in project product-is by wso2.
the class AbstractSAMLSSOTestCase method testInit.
public void testInit() throws Exception {
ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, null);
applicationManagementServiceClient = new ApplicationManagementServiceClient(sessionCookie, backendURL, configContext);
ssoConfigServiceClient = new SAMLSSOConfigServiceClient(backendURL, sessionCookie);
remoteUSMServiceClient = new RemoteUserStoreManagerServiceClient(backendURL, sessionCookie);
httpClient = HttpClientBuilder.create().setDefaultCookieStore(new BasicCookieStore()).build();
}
Aggregations