Search in sources :

Example 6 with SAMLSSOServiceProviderDTO

use of org.wso2.carbon.identity.sso.saml.stub.types.SAMLSSOServiceProviderDTO in project product-is by wso2.

the class SAMLLocalAndOutboundAuthenticatorsTestCase method getSsoServiceProviderDTO.

private SAMLSSOServiceProviderDTO getSsoServiceProviderDTO() {
    SAMLSSOServiceProviderDTO samlssoServiceProviderDTO = new SAMLSSOServiceProviderDTO();
    samlssoServiceProviderDTO.setIssuer(config.getApplication().getArtifact());
    samlssoServiceProviderDTO.setAssertionConsumerUrls(new String[] { String.format(ACS_URL, config.getApplication().getArtifact()) });
    samlssoServiceProviderDTO.setDefaultAssertionConsumerUrl(String.format(ACS_URL, config.getApplication().getArtifact()));
    samlssoServiceProviderDTO.setNameIDFormat(NAMEID_FORMAT);
    samlssoServiceProviderDTO.setDoSignAssertions(true);
    samlssoServiceProviderDTO.setDoSignResponse(true);
    samlssoServiceProviderDTO.setDoSingleLogout(true);
    samlssoServiceProviderDTO.setLoginPageURL(LOGIN_URL);
    return samlssoServiceProviderDTO;
}
Also used : SAMLSSOServiceProviderDTO(org.wso2.carbon.identity.sso.saml.stub.types.SAMLSSOServiceProviderDTO)

Example 7 with SAMLSSOServiceProviderDTO

use of org.wso2.carbon.identity.sso.saml.stub.types.SAMLSSOServiceProviderDTO in project product-is by wso2.

the class UserSessionTest method createSAMLServiceProviderDTO.

private SAMLSSOServiceProviderDTO createSAMLServiceProviderDTO(String issuer) {
    SAMLSSOServiceProviderDTO samlssoServiceProviderDTO = new SAMLSSOServiceProviderDTO();
    samlssoServiceProviderDTO.setIssuer(issuer);
    samlssoServiceProviderDTO.setAssertionConsumerUrls(new String[] { String.format(SAMPLE_APP_URL, issuer) + APP_HOMEPAGE });
    samlssoServiceProviderDTO.setDefaultAssertionConsumerUrl(String.format(SAMPLE_APP_URL, issuer) + APP_HOMEPAGE);
    samlssoServiceProviderDTO.setAttributeConsumingServiceIndex("1239245949");
    samlssoServiceProviderDTO.setNameIDFormat("urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress");
    samlssoServiceProviderDTO.setDoSignAssertions(true);
    samlssoServiceProviderDTO.setDoSignResponse(true);
    samlssoServiceProviderDTO.setDoSingleLogout(true);
    samlssoServiceProviderDTO.setLoginPageURL(LOGIN_PAGE);
    return samlssoServiceProviderDTO;
}
Also used : SAMLSSOServiceProviderDTO(org.wso2.carbon.identity.sso.saml.stub.types.SAMLSSOServiceProviderDTO)

Example 8 with SAMLSSOServiceProviderDTO

use of org.wso2.carbon.identity.sso.saml.stub.types.SAMLSSOServiceProviderDTO in project product-is by wso2.

the class AbstractSAMLSSOTestCase method createSsoSPDTOForSAMLartifactBinding.

/**
 * Create SAML SSO Service Provider DTO For SAML artifact binding.
 *
 * @param config contains the details of the SAML artifact binding enabled service provider application.
 * @return the created SAMLSSOServiceProviderDTO.
 */
public SAMLSSOServiceProviderDTO createSsoSPDTOForSAMLartifactBinding(SAMLConfig config) {
    SAMLSSOServiceProviderDTO idpInitSpDTO = createSsoSPDTO(config);
    idpInitSpDTO.setEnableSAML2ArtifactBinding(true);
    return idpInitSpDTO;
}
Also used : SAMLSSOServiceProviderDTO(org.wso2.carbon.identity.sso.saml.stub.types.SAMLSSOServiceProviderDTO)

Example 9 with SAMLSSOServiceProviderDTO

use of org.wso2.carbon.identity.sso.saml.stub.types.SAMLSSOServiceProviderDTO in project product-is by wso2.

the class RegistryMountTestCase method createSsoServiceProviderDTO.

private SAMLSSOServiceProviderDTO createSsoServiceProviderDTO() {
    SAMLSSOServiceProviderDTO samlssoServiceProviderDTO = new SAMLSSOServiceProviderDTO();
    samlssoServiceProviderDTO.setIssuer(artifact);
    samlssoServiceProviderDTO.setAssertionConsumerUrls(new String[] { String.format(ACS_URL, artifact) });
    samlssoServiceProviderDTO.setDefaultAssertionConsumerUrl(String.format(ACS_URL, artifact));
    samlssoServiceProviderDTO.setAttributeConsumingServiceIndex(ATTRIBUTE_CS_INDEX_VALUE);
    samlssoServiceProviderDTO.setNameIDFormat(NAMEID_FORMAT);
    samlssoServiceProviderDTO.setDoSignAssertions(false);
    samlssoServiceProviderDTO.setDoSignResponse(false);
    samlssoServiceProviderDTO.setDoSingleLogout(true);
    samlssoServiceProviderDTO.setLoginPageURL(LOGIN_URL);
    return samlssoServiceProviderDTO;
}
Also used : SAMLSSOServiceProviderDTO(org.wso2.carbon.identity.sso.saml.stub.types.SAMLSSOServiceProviderDTO)

Example 10 with SAMLSSOServiceProviderDTO

use of org.wso2.carbon.identity.sso.saml.stub.types.SAMLSSOServiceProviderDTO in project product-is by wso2.

the class SAMLErrorResponseTestCase method createSsoServiceProviderDTO.

private SAMLSSOServiceProviderDTO createSsoServiceProviderDTO() {
    SAMLSSOServiceProviderDTO samlssoServiceProviderDTO = new SAMLSSOServiceProviderDTO();
    samlssoServiceProviderDTO.setIssuer(ARTIFACT_ID);
    samlssoServiceProviderDTO.setAssertionConsumerUrls(new String[] { String.format(INVALID_ACS_URL, ARTIFACT_ID) });
    samlssoServiceProviderDTO.setDefaultAssertionConsumerUrl(String.format(INVALID_ACS_URL, ARTIFACT_ID));
    samlssoServiceProviderDTO.setNameIDFormat(NAMEID_FORMAT);
    samlssoServiceProviderDTO.setDoSignAssertions(false);
    samlssoServiceProviderDTO.setDoSignResponse(false);
    samlssoServiceProviderDTO.setDoSingleLogout(true);
    samlssoServiceProviderDTO.setLoginPageURL(LOGIN_URL);
    return samlssoServiceProviderDTO;
}
Also used : SAMLSSOServiceProviderDTO(org.wso2.carbon.identity.sso.saml.stub.types.SAMLSSOServiceProviderDTO)

Aggregations

SAMLSSOServiceProviderDTO (org.wso2.carbon.identity.sso.saml.stub.types.SAMLSSOServiceProviderDTO)34 IOException (java.io.IOException)7 RemoteException (java.rmi.RemoteException)5 ParserConfigurationException (javax.xml.parsers.ParserConfigurationException)5 Test (org.testng.annotations.Test)5 IdentitySAMLSSOConfigServiceIdentityException (org.wso2.carbon.identity.sso.saml.stub.IdentitySAMLSSOConfigServiceIdentityException)5 SAXException (org.xml.sax.SAXException)5 SAMLSSOServiceProviderDTO (org.wso2.carbon.identity.sso.saml.dto.SAMLSSOServiceProviderDTO)4 UnsupportedEncodingException (java.io.UnsupportedEncodingException)3 XPathExpressionException (javax.xml.xpath.XPathExpressionException)3 HttpResponse (org.apache.http.HttpResponse)3 ConfigurationException (org.opensaml.xml.ConfigurationException)3 ValidationException (org.opensaml.xml.validation.ValidationException)3 IdentityException (org.wso2.carbon.identity.base.IdentityException)3 TransformerException (javax.xml.transform.TransformerException)2 Assertion (org.opensaml.saml2.core.Assertion)2 EncryptedAssertion (org.opensaml.saml2.core.EncryptedAssertion)2 InboundAuthenticationRequestConfig (org.wso2.carbon.identity.application.common.model.InboundAuthenticationRequestConfig)2 Property (org.wso2.carbon.identity.application.common.model.Property)2 ServiceProvider (org.wso2.carbon.identity.application.common.model.xsd.ServiceProvider)2