Examples of EntitiesDescriptorType


Examples of org.picketlink.identity.federation.saml.v2.metadata.EntitiesDescriptorType

     */
    public IDPType getIDPConfiguration() throws ProcessingException {
        IDPType idpType = null;
        if (fileAvailable()) {
            try {
                EntitiesDescriptorType entities = parseMDFile();
                IDPSSODescriptorType idpSSO = CoreConfigUtil.getIDPDescriptor(entities);
               
                if (idpSSO != null) {
                    idpType = CoreConfigUtil.getIDPType(idpSSO);
                }
View Full Code Here

Examples of org.picketlink.identity.federation.saml.v2.metadata.EntitiesDescriptorType

        ClassLoader tcl = Thread.currentThread().getContextClassLoader();
        InputStream is = tcl.getResourceAsStream("saml2/metadata/seam-entities.xml");
        assertNotNull("Inputstream not null", is);

        SAMLParser parser = new SAMLParser();
        EntitiesDescriptorType entities = (EntitiesDescriptorType) parser.parse(is);
        Assert.assertNotNull(entities);
        Assert.assertEquals(2, entities.getEntityDescriptor().size());
        EntityDescriptorType entity = (EntityDescriptorType) entities.getEntityDescriptor().get(0);
        IDPSSODescriptorType idp = entity.getChoiceType().get(0).getDescriptors().get(0).getIdpDescriptor();
        KeyDescriptorType keyDescriptor = idp.getKeyDescriptor().get(0);
        X509Certificate cert = SAMLMetadataUtil.getCertificate(keyDescriptor);
        Assert.assertNotNull(cert);
        Assert.assertEquals("CN=test, OU=OpenSSO, O=Sun, L=Santa Clara, ST=California, C=US", cert.getIssuerDN().getName());
View Full Code Here

Examples of org.picketlink.identity.federation.saml.v2.metadata.EntitiesDescriptorType

        ClassLoader tcl = Thread.currentThread().getContextClassLoader();
        InputStream is = tcl.getResourceAsStream("saml2/metadata/testshib.org.idp-metadata.xml");
        assertNotNull("Inputstream not null", is);
        SAMLParser parser = new SAMLParser();

        EntitiesDescriptorType entities = (EntitiesDescriptorType) parser.parse(is);
        assertNotNull(entities);

        // Another md
        is = tcl.getResourceAsStream("saml2/metadata/shib.idp-metadata.xml");
        assertNotNull("Inputstream not null", is);
View Full Code Here

Examples of org.picketlink.identity.federation.saml.v2.metadata.EntitiesDescriptorType

            ClassLoader tcl = Thread.currentThread().getContextClassLoader();
            InputStream is = tcl.getResourceAsStream("saml2/metadata/testshib-two-metadata.xml");
            assertNotNull("Inputstream not null", is);
            SAMLParser parser = new SAMLParser();

            EntitiesDescriptorType entities = (EntitiesDescriptorType) parser.parse(is);
            assertNotNull(entities);
            assertEquals("urn:mace:shibboleth:testshib:two", entities.getName());

            ByteArrayOutputStream baos = new ByteArrayOutputStream();

            XMLStreamWriter writer = StaxUtil.getXMLStreamWriter(baos);
View Full Code Here

Examples of org.picketlink.identity.federation.saml.v2.metadata.EntitiesDescriptorType

    @Test
    public void testMetadataToSP() throws Exception {
        InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(idpMetadata);
        assertNotNull(is);
        SAMLParser parser = new SAMLParser();
        EntitiesDescriptorType entities = (EntitiesDescriptorType) parser.parse(is);
        assertNotNull(entities);

        ProviderType sp = CoreConfigUtil.getSPConfiguration((EntityDescriptorType) entities.getEntityDescriptor().get(0),
                JBossSAMLURIConstants.SAML_HTTP_POST_BINDING.get());
        assertNotNull(sp);
        assertEquals("https://idp.testshib.org/idp/profile/SAML2/POST/SSO", sp.getIdentityURL());
    }
View Full Code Here

Examples of org.picketlink.identity.federation.saml.v2.metadata.EntitiesDescriptorType

        } catch (Exception e) {
            throw new RuntimeException(e);
        }
        IDPSSODescriptorType idpSSO = null;
        if (metadata instanceof EntitiesDescriptorType) {
            EntitiesDescriptorType entities = (EntitiesDescriptorType) metadata;
            idpSSO = handleMetadata(entities);
        } else {
            idpSSO = handleMetadata((EntityDescriptorType) metadata);
        }
        if (idpSSO == null) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.