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

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


                assertTrue(spDescriptor.isAuthnRequestsSigned());
                List<EndpointType> logoutEndpoints = spDescriptor.getSingleLogoutService();
                assertNotNull(logoutEndpoints);
                assertEquals(logoutEndpoints.size(), 1);
                EndpointType endpoint = logoutEndpoints.get(0);
                assertEquals("https://login.salesforce.com/saml/logout-request.jsp?saml=MgoTx78aEPkEM4eGV5ZzptlliwIVkRkOWYKlqXQq2StV_sLo0EiRqKYtIc",
                      endpoint.getLocation().toASCIIString());
                assertEquals("urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST", endpoint.getBinding().toASCIIString());
            }
            else if ("google.com/a/somedomain.com".equals(entDescriptorType.getEntityID())) {
                SPSSODescriptorType spDescriptor = CoreConfigUtil.getSPDescriptor(entDescriptorType);

                assertFalse(spDescriptor.isAuthnRequestsSigned());
View Full Code Here


        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(),
                "https://SProvider.com/SAML/SLO/Browser", "https://SProvider.com/SAML/SLO/Response");

        SPSSODescriptorType sp = MetaDataBuilder.createSPSSODescriptor(true, keyDescriptorType, sloEndPoint, attributes,
                createJBossOrganization(lang));
        return sp;
View Full Code Here

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

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

        EndpointType ssoEndPoint = MetaDataBuilder.createEndpoint(JBossSAMLURIConstants.METADATA_HTTP_REDIRECT_BINDING.get(),
                "https://IdentityProvider.com/SAML/SSO/Browser", "https://IdentityProvider.com/SAML/SSO/Response");

        EndpointType sloEndPoint = MetaDataBuilder.createEndpoint(JBossSAMLURIConstants.METADATA_HTTP_REDIRECT_BINDING.get(),
                "https://IdentityProvider.com/SAML/SLO/Browser", "https://IdentityProvider.com/SAML/SLO/Response");

        return MetaDataBuilder.createIDPSSODescriptor(true, keyDescriptorType, ssoEndPoint, sloEndPoint, attributes,
                createJBossOrganization(lang));
    }
View Full Code Here

     * @param location
     * @param responseLocation
     * @return
     */
    public static EndpointType createEndpoint(String binding, String location, String responseLocation) {
        EndpointType endpoint = new EndpointType(URI.create(binding), URI.create(location));
        endpoint.setResponseLocation(URI.create(responseLocation));
        return endpoint;
    }
View Full Code Here

            } 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)) {
                startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
                EndpointType endpoint = getEndpointType(startElement);

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

                spSSODescriptor.addSingleLogoutService(endpoint);
            } else if (JBossSAMLConstants.MANAGE_NAMEID_SERVICE.get().equals(localPart)) {
                startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
                EndpointType endpoint = getEndpointType(startElement);

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

                spSSODescriptor.addManageNameIDService(endpoint);
View Full Code Here

            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);

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

                idpSSODescriptor.addAssertionIDRequestService(endpoint);
            } else if (JBossSAMLConstants.SINGLE_LOGOUT_SERVICE.get().equals(localPart)) {
                startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
                EndpointType endpoint = getEndpointType(startElement);

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

                idpSSODescriptor.addSingleLogoutService(endpoint);
            } else if (JBossSAMLConstants.SINGLE_SIGNON_SERVICE.get().equals(localPart)) {
                startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
                EndpointType endpoint = getEndpointType(startElement);

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

                idpSSODescriptor.addSingleSignOnService(endpoint);
            } else if (JBossSAMLConstants.MANAGE_NAMEID_SERVICE.get().equals(localPart)) {
                startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
                EndpointType endpoint = getEndpointType(startElement);

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

                idpSSODescriptor.addManageNameIDService(endpoint);
            } else if (JBossSAMLConstants.NAMEID_MAPPING_SERVICE.get().equals(localPart)) {
                startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
                EndpointType endpoint = getEndpointType(startElement);

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

                idpSSODescriptor.addNameIDMappingService(endpoint);
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

                attributeAuthority.addNameIDFormat(StaxParserUtil.getElementText(xmlEventReader));
            } else if (JBossSAMLConstants.EXTENSIONS.get().equalsIgnoreCase(localPart)) {
                attributeAuthority.setExtensions(parseExtensions(xmlEventReader));
            } else if (JBossSAMLConstants.ASSERTION_ID_REQUEST_SERVICE.get().equalsIgnoreCase(localPart)) {
                startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
                EndpointType endpoint = getEndpointType(startElement);
                EndElement endElement = StaxParserUtil.getNextEndElement(xmlEventReader);
                StaxParserUtil.validate(endElement, JBossSAMLConstants.ASSERTION_ID_REQUEST_SERVICE.get());
                attributeAuthority.addAssertionIDRequestService(endpoint);
            } else
                throw logger.parserUnknownTag(localPart, startElement.getLocation());
View Full Code Here

        AttributeType attributeType = new AttributeType("hello");
        List<AttributeType> attributes = new ArrayList<AttributeType>();
        attributes.add(attributeType);

        URI test = URI.create("http://test");
        EndpointType sloEndPoint = new EndpointType(test, test);
        KeyDescriptorType keyDescriptorType = new KeyDescriptorType();
        String str = "<a/>";
        keyDescriptorType.setKeyInfo(DocumentUtil.getDocument(str).getDocumentElement());

        SPSSODescriptorType spSSO = MetaDataBuilderDelegate.createSPSSODescriptor(false, keyDescriptorType, sloEndPoint,
View Full Code Here

            if (logoutEndpoints == null || logoutEndpoints.size() == 0) {
                return null;
            }

            // Use first endpoint for now (Maybe later we can find logoutType according to bindingType from SAMLRequest)
            EndpointType logoutEndpoint = logoutEndpoints.get(0);
            return logoutEndpoint.getLocation().toASCIIString();
        }
View Full Code Here

TOP

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

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.