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

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


     * @return
     */
    public static IDPSSODescriptorType createIDPSSODescriptor(boolean requestsSigned, KeyDescriptorType keyDescriptorType,
            EndpointType ssoEndPoint, EndpointType sloEndPoint, List<AttributeType> attributes, OrganizationType org) {
        List<String> emptyList = new ArrayList<String>();
        IDPSSODescriptorType idp = new IDPSSODescriptorType(emptyList);
        idp.addSingleSignOnService(ssoEndPoint);
        idp.addSingleLogoutService(sloEndPoint);

        for (AttributeType attr : attributes) {
            idp.addAttribute(attr);
        }
        idp.addKeyDescriptor(keyDescriptorType);
        idp.setWantAuthnRequestsSigned(requestsSigned);
        idp.setOrganization(org);
        return idp;
    }
View Full Code Here


            startElement = (StartElement) xmlEvent;
            String localPart = startElement.getName().getLocalPart();

            if (JBossSAMLConstants.ARTIFACT_RESOLUTION_SERVICE.get().equals(localPart)) {
                IndexedEndpointType endpoint = parseArtifactResolutionService(xmlEventReader, startElement);
                spSSODescriptor.addArtifactResolutionService(endpoint);
            } else if (JBossSAMLConstants.ASSERTION_CONSUMER_SERVICE.get().equals(localPart)) {
                IndexedEndpointType endpoint = parseAssertionConsumerService(xmlEventReader, startElement);
                spSSODescriptor.addAssertionConsumerService(endpoint);
            } else if (JBossSAMLConstants.ATTRIBUTE_CONSUMING_SERVICE.get().equals(localPart)) {
                AttributeConsumingServiceType attributeConsumer = parseAttributeConsumingService(xmlEventReader, startElement);
                spSSODescriptor.addAttributeConsumerService(attributeConsumer);
            } else if (JBossSAMLConstants.SINGLE_LOGOUT_SERVICE.get().equals(localPart)) {
View Full Code Here

            startElement = (StartElement) xmlEvent;
            String localPart = startElement.getName().getLocalPart();

            if (JBossSAMLConstants.ARTIFACT_RESOLUTION_SERVICE.get().equals(localPart)) {
                IndexedEndpointType endpoint = parseArtifactResolutionService(xmlEventReader, startElement);
                idpSSODescriptor.addArtifactResolutionService(endpoint);
            } else if (JBossSAMLConstants.ASSERTION_ID_REQUEST_SERVICE.get().equals(localPart)) {
                startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
                EndpointType endpoint = getEndpointType(startElement);
View Full Code Here

        String binding = StaxParserUtil.getAttributeValue(bindingAttr);

        Attribute locationAttr = startElement.getAttributeByName(new QName(JBossSAMLConstants.LOCATION.get()));
        String location = StaxParserUtil.getAttributeValue(locationAttr);

        EndpointType endpoint = new IndexedEndpointType(URI.create(binding), URI.create(location));
        Attribute responseLocation = startElement.getAttributeByName(new QName(JBossSAMLConstants.RESPONSE_LOCATION.get()));
        if (responseLocation != null) {
            endpoint.setResponseLocation(URI.create(StaxParserUtil.getAttributeValue(responseLocation)));
        }
        return endpoint;
    }
View Full Code Here

                String binding = StaxParserUtil.getAttributeValue(bindingAttr);

                Attribute locationAttr = startElement.getAttributeByName(new QName(JBossSAMLConstants.LOCATION.get()));
                String location = StaxParserUtil.getAttributeValue(locationAttr);

                IndexedEndpointType endpoint = new IndexedEndpointType(URI.create(binding), URI.create(location));

                EndElement endElement = StaxParserUtil.getNextEndElement(xmlEventReader);
                StaxParserUtil.validate(endElement, JBossSAMLConstants.ATTRIBUTE_SERVICE.get());

                attributeAuthority.addAttributeService(endpoint);
View Full Code Here

    }

    private IndexedEndpointType parseAssertionConsumerService(XMLEventReader xmlEventReader, StartElement startElement)
            throws ParsingException {
        startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
        IndexedEndpointType endpoint = parseIndexedEndpoint(xmlEventReader, startElement);

        EndElement endElement = StaxParserUtil.getNextEndElement(xmlEventReader);
        StaxParserUtil.validate(endElement, JBossSAMLConstants.ASSERTION_CONSUMER_SERVICE.get());

        return endpoint;
View Full Code Here

    }

    private IndexedEndpointType parseArtifactResolutionService(XMLEventReader xmlEventReader, StartElement startElement)
            throws ParsingException {
        startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
        IndexedEndpointType endpoint = parseIndexedEndpoint(xmlEventReader, startElement);

        EndElement endElement = StaxParserUtil.getNextEndElement(xmlEventReader);
        StaxParserUtil.validate(endElement, JBossSAMLConstants.ARTIFACT_RESOLUTION_SERVICE.get());

        return endpoint;
View Full Code Here

        String binding = StaxParserUtil.getAttributeValue(bindingAttr);

        Attribute locationAttr = startElement.getAttributeByName(new QName(JBossSAMLConstants.LOCATION.get()));
        String location = StaxParserUtil.getAttributeValue(locationAttr);

        IndexedEndpointType endpoint = new IndexedEndpointType(URI.create(binding), URI.create(location));
        Attribute isDefault = startElement.getAttributeByName(new QName(JBossSAMLConstants.ISDEFAULT.get()));
        if (isDefault != null) {
            endpoint.setIsDefault(Boolean.parseBoolean(StaxParserUtil.getAttributeValue(isDefault)));
        }
        Attribute index = startElement.getAttributeByName(new QName(JBossSAMLConstants.INDEX.get()));
        if (index != null) {
            endpoint.setIndex(Integer.parseInt(StaxParserUtil.getAttributeValue(index)));
        }
        return endpoint;
    }
View Full Code Here

    public void testCreateKeyDescriptor() {
        Element keyInfo = KeyInfoBuilder.createKeyInfo("testKey");

        String algorithm = "http://www.w3.org/2001/04/xmlenc#rsa-1_5";

        KeyDescriptorType keyDescriptor = KeyDescriptorMetaDataBuilder
                .createKeyDescriptor(keyInfo, algorithm, 256, false, true);
        assertNotNull("Key Descriptor not null", keyDescriptor);
    }
View Full Code Here

        // TODO: improve keyinfo
        Element keyInfo = KeyInfoBuilder.createKeyInfo(id);

        String algorithm = null;

        KeyDescriptorType keyDescriptorType = KeyDescriptorMetaDataBuilder.createKeyDescriptor(keyInfo, algorithm, 0, true,
                false);

        List<AttributeType> attributes = new ArrayList<AttributeType>();

        EndpointType sloEndPoint = MetaDataBuilder.createEndpoint(JBossSAMLURIConstants.METADATA_HTTP_REDIRECT_BINDING.get(),
View Full Code Here

TOP

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

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.