Package org.picketlink.identity.federation.saml.v2.metadata

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


        if (idpType.getTrust() == null) {
            idpType.setTrust(new TrustType());
        }
       
        for (Object entityDescriptorObj : entities.getEntityDescriptor()) {
            EntityDescriptorType entityDescriptorType = (EntityDescriptorType) entityDescriptorObj;
            SPSSODescriptorType spDescriptor = CoreConfigUtil.getSPDescriptor(entityDescriptorType);
           
            if (spDescriptor != null) {
                for (IndexedEndpointType assertionConsumerService : spDescriptor.getAssertionConsumerService()) {
                    URI location = assertionConsumerService.getLocation();
View Full Code Here


        String fileName = "saml2/metadata/sp-entitydescriptor.xml";
        InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(fileName);
        assertNotNull(is);

        SAMLParser parser = new SAMLParser();
        EntityDescriptorType entityDesc = (EntityDescriptorType) parser.parse(is);

        ByteArrayOutputStream baos = new ByteArrayOutputStream();

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

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

        SAMLParser parser = new SAMLParser();
        EntityDescriptorType entity = (EntityDescriptorType) parser.parse(is);
        assertNotNull(entity);
        ByteArrayOutputStream baos = new ByteArrayOutputStream();

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

        String str = "<a/>";
        keyDescriptorType.setKeyInfo(DocumentUtil.getDocument(str).getDocumentElement());

        SPSSODescriptorType spSSO = MetaDataBuilderDelegate.createSPSSODescriptor(false, keyDescriptorType, sloEndPoint,
                attributes, org);
        EntityDescriptorType entity = MetaDataBuilderDelegate.createEntityDescriptor(spSSO);

        ByteArrayOutputStream baos = new ByteArrayOutputStream();

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

        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

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

        SAMLParser parser = new SAMLParser();
        EntityDescriptorType entity = (EntityDescriptorType) parser.parse(is);
        assertNotNull(entity);
        OrganizationType org = entity.getOrganization();
        assertNotNull(org);

        List<ContactType> contactPersons = entity.getContactPerson();
        assertNotNull(contactPersons);
        assertTrue(contactPersons.size() == 1);

        assertEquals("technical", contactPersons.get(0).getContactType().value());
        assertEquals("SAML SP Support", contactPersons.get(0).getSurName());
View Full Code Here

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

        EntityDescriptorType entity = (EntityDescriptorType) parser.parse(is);
        assertNotNull(entity);
    }
View Full Code Here

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

        EntityDescriptorType edt = (EntityDescriptorType) parser.parse(is);
        assertNotNull(edt);
        FileBasedMetadataConfigurationStore fbd = new FileBasedMetadataConfigurationStore();
        fbd.persist(edt, id);

        EntityDescriptorType loaded = fbd.load(id);
        assertNotNull("loaded EntityDescriptorType not null", loaded);
        fbd.delete(id);

        try {
            fbd.load(id);
View Full Code Here

    private void addIDP(HttpServletRequest request, HttpServletResponse response) throws IOException {
        String spName = request.getParameter("spname");
        String idpName = request.getParameter("idpname");
        String metadataURL = request.getParameter("metadataURL");

        EntityDescriptorType edt = getMetaData(metadataURL);

        configProvider.persist(edt, idpName);

        HttpSession httpSession = request.getSession();
        httpSession.setAttribute("idp", edt);
View Full Code Here

    private void addSP(HttpServletRequest request, HttpServletResponse response) throws IOException {
        String idpName = request.getParameter("idpname");
        String spName = request.getParameter("spname");
        String metadataURL = request.getParameter("metadataURL");

        EntityDescriptorType edt = getMetaData(metadataURL);
        configProvider.persist(edt, spName);

        HttpSession httpSession = request.getSession();
        httpSession.setAttribute("sp", edt);
View Full Code Here

TOP

Related Classes of org.picketlink.identity.federation.saml.v2.metadata.EntityDescriptorType

Copyright © 2018 www.massapicom. 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.