use of org.wso2.carbon.identity.application.common.model.xsd.InboundAuthenticationConfig in project product-is by wso2.
the class ConditionalAuthenticationTestCase method createServiceProviderInSecondaryIS.
private void createServiceProviderInSecondaryIS() throws Exception {
ServiceProvider serviceProvider = new ServiceProvider();
serviceProvider.setApplicationName(SECONDARY_IS_APPLICATION_NAME);
serviceProvider.setDescription("This is a test Service Provider");
applicationManagementServiceClient2.createApplication(serviceProvider);
serviceProvider = applicationManagementServiceClient2.getApplication(SECONDARY_IS_APPLICATION_NAME);
InboundAuthenticationRequestConfig samlAuthenticationRequestConfig = new InboundAuthenticationRequestConfig();
samlAuthenticationRequestConfig.setInboundAuthKey(SECONDARY_IS_APPLICATION_NAME);
samlAuthenticationRequestConfig.setInboundAuthType("samlsso");
org.wso2.carbon.identity.application.common.model.xsd.Property property = new org.wso2.carbon.identity.application.common.model.xsd.Property();
samlAuthenticationRequestConfig.setProperties(new org.wso2.carbon.identity.application.common.model.xsd.Property[] { property });
InboundAuthenticationConfig inboundAuthenticationConfig = new InboundAuthenticationConfig();
inboundAuthenticationConfig.setInboundAuthenticationRequestConfigs(new InboundAuthenticationRequestConfig[] { samlAuthenticationRequestConfig });
serviceProvider.setInboundAuthenticationConfig(inboundAuthenticationConfig);
applicationManagementServiceClient2.updateApplicationData(serviceProvider);
}
use of org.wso2.carbon.identity.application.common.model.xsd.InboundAuthenticationConfig in project product-is by wso2.
the class AbstractApplicationAuthzTestCase method createApplication.
protected void createApplication(String applicationName) throws Exception {
ServiceProvider serviceProvider = new ServiceProvider();
serviceProvider.setApplicationName(applicationName);
serviceProvider.setDescription("This is a test Service Provider for AZ test");
applicationManagementServiceClient.createApplication(serviceProvider);
serviceProvider = applicationManagementServiceClient.getApplication(applicationName);
InboundAuthenticationRequestConfig requestConfig = new InboundAuthenticationRequestConfig();
requestConfig.setInboundAuthType(INBOUND_AUTH_TYPE);
requestConfig.setInboundAuthKey(applicationName);
InboundAuthenticationConfig inboundAuthenticationConfig = new InboundAuthenticationConfig();
inboundAuthenticationConfig.setInboundAuthenticationRequestConfigs(new InboundAuthenticationRequestConfig[] { requestConfig });
serviceProvider.setInboundAuthenticationConfig(inboundAuthenticationConfig);
LocalAndOutboundAuthenticationConfig outboundAuthConfig = new LocalAndOutboundAuthenticationConfig();
outboundAuthConfig.setEnableAuthorization(true);
serviceProvider.setLocalAndOutBoundAuthenticationConfig(outboundAuthConfig);
applicationManagementServiceClient.updateApplicationData(serviceProvider);
}
use of org.wso2.carbon.identity.application.common.model.xsd.InboundAuthenticationConfig in project product-is by wso2.
the class EmailOTPTestCase method createApplication.
private void createApplication() throws Exception {
ServiceProvider serviceProvider = new ServiceProvider();
serviceProvider.setApplicationName(APPLICATION_NAME);
serviceProvider.setDescription("This is a test Service Provider");
applicationManagementServiceClient.createApplication(serviceProvider);
serviceProvider = applicationManagementServiceClient.getApplication(APPLICATION_NAME);
InboundAuthenticationRequestConfig requestConfig = new InboundAuthenticationRequestConfig();
requestConfig.setInboundAuthType(INBOUND_AUTH_TYPE);
requestConfig.setInboundAuthKey(config.getSpEntityId());
Property attributeConsumerServiceIndexProp = new Property();
attributeConsumerServiceIndexProp.setName(ATTRIBUTE_CS_INDEX_NAME);
attributeConsumerServiceIndexProp.setValue(ATTRIBUTE_CS_INDEX_VALUE);
requestConfig.setProperties(new Property[] { attributeConsumerServiceIndexProp });
InboundAuthenticationConfig inboundAuthenticationConfig = new InboundAuthenticationConfig();
inboundAuthenticationConfig.setInboundAuthenticationRequestConfigs(new InboundAuthenticationRequestConfig[] { requestConfig });
serviceProvider.setInboundAuthenticationConfig(inboundAuthenticationConfig);
serviceProvider.setLocalAndOutBoundAuthenticationConfig(getLocalAndOutBoundAuthenticator());
serviceProvider.getLocalAndOutBoundAuthenticationConfig().setSubjectClaimUri(EMAIL_CLAIM_URI);
applicationManagementServiceClient.updateApplicationData(serviceProvider);
ssoConfigServiceClient.addServiceProvider(getSsoServiceProviderDTO());
}
use of org.wso2.carbon.identity.application.common.model.xsd.InboundAuthenticationConfig in project product-is by wso2.
the class OAuth2BackChannelLogoutTestCase method createServiceProvider.
private ServiceProvider createServiceProvider() throws Exception {
ServiceProvider serviceProvider = new ServiceProvider();
serviceProvider.setApplicationName(OIDC_APP_NAME);
applicationManagementServiceClient.createApplication(serviceProvider);
serviceProvider = applicationManagementServiceClient.getApplication(OIDC_APP_NAME);
InboundAuthenticationRequestConfig requestConfig = new InboundAuthenticationRequestConfig();
requestConfig.setInboundAuthKey(oidcAppClientId);
requestConfig.setInboundAuthType("oauth2");
if (StringUtils.isNotBlank(oidcAppClientSecret)) {
Property property = new Property();
property.setName("oauthConsumerSecret");
property.setValue(oidcAppClientSecret);
Property[] properties = { property };
requestConfig.setProperties(properties);
}
InboundAuthenticationConfig inboundAuthenticationConfig = new InboundAuthenticationConfig();
inboundAuthenticationConfig.setInboundAuthenticationRequestConfigs(new InboundAuthenticationRequestConfig[] { requestConfig });
serviceProvider.setInboundAuthenticationConfig(inboundAuthenticationConfig);
applicationManagementServiceClient.updateApplicationData(serviceProvider);
return serviceProvider;
}
use of org.wso2.carbon.identity.application.common.model.xsd.InboundAuthenticationConfig in project product-is by wso2.
the class ChallengeQuestionPostAuthnHandlerTestCase method createApplication.
private void createApplication() throws Exception {
ServiceProvider serviceProvider = new ServiceProvider();
serviceProvider.setApplicationName(APPLICATION_NAME);
serviceProvider.setDescription("This is a test Service Provider");
applicationManagementServiceClient.createApplication(serviceProvider);
serviceProvider = applicationManagementServiceClient.getApplication(APPLICATION_NAME);
serviceProvider.getClaimConfig().setClaimMappings(getClaimMappings());
InboundAuthenticationRequestConfig requestConfig = new InboundAuthenticationRequestConfig();
requestConfig.setInboundAuthType(INBOUND_AUTH_TYPE);
requestConfig.setInboundAuthKey(config.getApp().getArtifact());
Property attributeConsumerServiceIndexProp = new Property();
attributeConsumerServiceIndexProp.setName(ATTRIBUTE_CS_INDEX_NAME);
attributeConsumerServiceIndexProp.setValue(ATTRIBUTE_CS_INDEX_VALUE);
requestConfig.setProperties(new Property[] { attributeConsumerServiceIndexProp });
InboundAuthenticationConfig inboundAuthenticationConfig = new InboundAuthenticationConfig();
inboundAuthenticationConfig.setInboundAuthenticationRequestConfigs(new InboundAuthenticationRequestConfig[] { requestConfig });
serviceProvider.setInboundAuthenticationConfig(inboundAuthenticationConfig);
applicationManagementServiceClient.updateApplicationData(serviceProvider);
}
Aggregations