use of org.wso2.carbon.identity.application.common.model.LocalAndOutboundAuthenticationConfig in project product-is by wso2.
the class SAMLLocalAndOutboundAuthenticatorsTestCase method createAdvanceAuthenticatorWithMultiOptions.
/**
* Create the AdvancedAuthenticator with Multi options.
* Use any attributes needed if needed to do multiple tests with different advanced authenticators.
* @throws Exception
*/
private void createAdvanceAuthenticatorWithMultiOptions() throws Exception {
LocalAndOutboundAuthenticationConfig localAndOutboundAuthenticationConfig = new LocalAndOutboundAuthenticationConfig();
AuthenticationStep authenticationStep = new AuthenticationStep();
authenticationStep.setStepOrder(1);
LocalAuthenticatorConfig localConfig = new LocalAuthenticatorConfig();
localConfig.setName(CommonConstants.BASIC_AUTHENTICATOR);
localConfig.setDisplayName("basicauth");
localConfig.setEnabled(true);
authenticationStep.setLocalAuthenticatorConfigs(new LocalAuthenticatorConfig[] { localConfig });
authenticationStep.setFederatedIdentityProviders(new org.wso2.carbon.identity.application.common.model.xsd.IdentityProvider[] { getFederatedGoogleIDP() });
authenticationStep.setSubjectStep(true);
authenticationStep.setAttributeStep(true);
localAndOutboundAuthenticationConfig.addAuthenticationSteps(authenticationStep);
config.getAuthenticator().setLocalAndOutboundAuthenticationConfig(localAndOutboundAuthenticationConfig);
}
use of org.wso2.carbon.identity.application.common.model.LocalAndOutboundAuthenticationConfig in project product-is by wso2.
the class ConditionalAuthenticationTestCase method updateAuthScript.
/**
* Update service provider authentication script config.
*
* @param filename File Name of the authentication script.
* @throws Exception
*/
private void updateAuthScript(String filename) throws Exception {
LocalAndOutboundAuthenticationConfig outboundAuthConfig = createLocalAndOutboundAuthenticationConfig();
outboundAuthConfig.setEnableAuthorization(true);
String script = getConditionalAuthScript(filename);
AuthenticationScriptConfig config = new AuthenticationScriptConfig();
config.setContent(script);
config.setEnabled(true);
outboundAuthConfig.setAuthenticationScriptConfig(config);
serviceProvider.setLocalAndOutBoundAuthenticationConfig(outboundAuthConfig);
applicationManagementServiceClient.updateApplicationData(serviceProvider);
}
use of org.wso2.carbon.identity.application.common.model.LocalAndOutboundAuthenticationConfig in project product-is by wso2.
the class ConditionalAuthenticationTestCase method createLocalAndOutboundAuthenticationConfig.
protected LocalAndOutboundAuthenticationConfig createLocalAndOutboundAuthenticationConfig() throws Exception {
LocalAndOutboundAuthenticationConfig localAndOutboundAuthenticationConfig = super.createLocalAndOutboundAuthenticationConfig();
AuthenticationStep authenticationStep2 = new AuthenticationStep();
authenticationStep2.setStepOrder(2);
authenticationStep2.setSubjectStep(false);
authenticationStep2.setAttributeStep(false);
authenticationStep2.setFederatedIdentityProviders(new org.wso2.carbon.identity.application.common.model.xsd.IdentityProvider[] { getFederatedSAMLSSOIDP() });
localAndOutboundAuthenticationConfig.addAuthenticationSteps(authenticationStep2);
return localAndOutboundAuthenticationConfig;
}
use of org.wso2.carbon.identity.application.common.model.LocalAndOutboundAuthenticationConfig 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.LocalAndOutboundAuthenticationConfig in project product-is by wso2.
the class OIDCSPWiseSkipLoginConsentTestCase method configureSPToSkipConsent.
private void configureSPToSkipConsent() throws Exception {
OIDCApplication oidcApplication = OIDCUtilTest.applications.get(OIDCUtilTest.playgroundAppTwoAppName);
ServiceProvider serviceProvider = appMgtclient.getApplication(oidcApplication.getApplicationName());
LocalAndOutboundAuthenticationConfig localAndOutboundAuthenticationConfig = new LocalAndOutboundAuthenticationConfig();
localAndOutboundAuthenticationConfig.setSkipConsent(true);
serviceProvider.setLocalAndOutBoundAuthenticationConfig(localAndOutboundAuthenticationConfig);
appMgtclient.updateApplicationData(serviceProvider);
}
Aggregations