Search in sources :

Example 11 with OIDCApplication

use of org.wso2.identity.integration.test.oidc.bean.OIDCApplication 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);
}
Also used : LocalAndOutboundAuthenticationConfig(org.wso2.carbon.identity.application.common.model.xsd.LocalAndOutboundAuthenticationConfig) ServiceProvider(org.wso2.carbon.identity.application.common.model.xsd.ServiceProvider) OIDCApplication(org.wso2.identity.integration.test.oidc.bean.OIDCApplication)

Example 12 with OIDCApplication

use of org.wso2.identity.integration.test.oidc.bean.OIDCApplication in project product-is by wso2.

the class OIDCSSOConsentTestCase method initApplication.

protected OIDCApplication initApplication() {
    playgroundApp = new OIDCApplication(OIDCUtilTest.playgroundAppOneAppName, OIDCUtilTest.playgroundAppOneAppContext, OIDCUtilTest.playgroundAppOneAppCallBackUri);
    playgroundApp.addRequiredClaim(OIDCUtilTest.emailClaimUri);
    playgroundApp.addRequiredClaim(OIDCUtilTest.firstNameClaimUri);
    return playgroundApp;
}
Also used : OIDCApplication(org.wso2.identity.integration.test.oidc.bean.OIDCApplication)

Example 13 with OIDCApplication

use of org.wso2.identity.integration.test.oidc.bean.OIDCApplication in project product-is by wso2.

the class OIDCSSOConsentTestCase method updateApplication.

private void updateApplication(OIDCApplication playgroundApp, ServiceProvider serviceProvider) throws Exception {
    playgroundApp.addRequiredClaim(OIDCUtilTest.lastNameClaimUri);
    ClaimConfig claimConfig = new ClaimConfig();
    Claim claim = new Claim();
    claim.setClaimUri(OIDCUtilTest.lastNameClaimUri);
    ClaimMapping claimMapping = new ClaimMapping();
    claimMapping.setRequested(true);
    claimMapping.setLocalClaim(claim);
    claimMapping.setRemoteClaim(claim);
    claimConfig.addClaimMappings(claimMapping);
    serviceProvider.setClaimConfig(claimConfig);
    updateApplication(serviceProvider);
}
Also used : ClaimMapping(org.wso2.carbon.identity.application.common.model.xsd.ClaimMapping) ClaimConfig(org.wso2.carbon.identity.application.common.model.xsd.ClaimConfig) Claim(org.wso2.carbon.identity.application.common.model.xsd.Claim)

Example 14 with OIDCApplication

use of org.wso2.identity.integration.test.oidc.bean.OIDCApplication in project product-is by wso2.

the class OIDCUtilTest method initApplications.

/**
 * Initiate an Application.
 */
public static void initApplications() {
    OIDCApplication playgroundApp = new OIDCApplication(playgroundAppOneAppName, playgroundAppOneAppContext, playgroundAppOneAppCallBackUri);
    playgroundApp.addRequiredClaim(emailClaimUri);
    playgroundApp.addRequiredClaim(firstNameClaimUri);
    playgroundApp.addRequiredClaim(lastNameClaimUri);
    applications.put(playgroundAppOneAppName, playgroundApp);
    playgroundApp = new OIDCApplication(playgroundAppTwoAppName, playgroundAppTwoAppContext, playgroundAppTwoAppCallBackUri);
    playgroundApp.addRequiredClaim(emailClaimUri);
    playgroundApp.addRequiredClaim(firstNameClaimUri);
    playgroundApp.addRequiredClaim(lastNameClaimUri);
    applications.put(playgroundAppTwoAppName, playgroundApp);
}
Also used : OIDCApplication(org.wso2.identity.integration.test.oidc.bean.OIDCApplication)

Aggregations

OIDCApplication (org.wso2.identity.integration.test.oidc.bean.OIDCApplication)7 OAuthConsumerAppDTO (org.wso2.carbon.identity.oauth.stub.dto.OAuthConsumerAppDTO)6 Claim (org.wso2.carbon.identity.application.common.model.xsd.Claim)5 ClaimConfig (org.wso2.carbon.identity.application.common.model.xsd.ClaimConfig)5 ClaimMapping (org.wso2.carbon.identity.application.common.model.xsd.ClaimMapping)5 ArrayList (java.util.ArrayList)4 InboundAuthenticationRequestConfig (org.wso2.carbon.identity.application.common.model.xsd.InboundAuthenticationRequestConfig)4 OutboundProvisioningConfig (org.wso2.carbon.identity.application.common.model.xsd.OutboundProvisioningConfig)4 ServiceProvider (org.wso2.carbon.identity.application.common.model.xsd.ServiceProvider)4 Property (org.wso2.carbon.identity.application.common.model.idp.xsd.Property)2 Property (org.wso2.carbon.identity.application.common.model.xsd.Property)2 URI (java.net.URI)1 HttpResponse (org.apache.http.HttpResponse)1 URIBuilder (org.apache.http.client.utils.URIBuilder)1 Test (org.testng.annotations.Test)1 IdentityProviderProperty (org.wso2.carbon.identity.application.common.model.idp.xsd.IdentityProviderProperty)1 LocalAndOutboundAuthenticationConfig (org.wso2.carbon.identity.application.common.model.xsd.LocalAndOutboundAuthenticationConfig)1