Examples of SPSSODescriptorType


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

        assertNotNull("IDPSSODescriptor is not null", idp);
    }

    @Test
    public void testCreateSPSSODescriptor() {
        SPSSODescriptorType sp = createSPSSODescriptor();

        assertNotNull("IDPSSODescriptor is not null", sp);
    }
View Full Code Here

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

        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

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

    public static SPSSODescriptorType createSPSSODescriptor(boolean requestsSigned, KeyDescriptorType keyDescriptorType,
            EndpointType sloEndPoint, List<AttributeType> attributes, OrganizationType org) {
        List<String> protocolEnumList = new ArrayList<String>();
        protocolEnumList.add(JBossSAMLURIConstants.PROTOCOL_NSURI.get());

        SPSSODescriptorType sp = new SPSSODescriptorType(protocolEnumList);
        sp.addSingleLogoutService(sloEndPoint);
        sp.addKeyDescriptor(keyDescriptorType);
        sp.setAuthnRequestsSigned(requestsSigned);
        sp.setOrganization(org);
        return sp;
    }
View Full Code Here

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

                spType.setLogoutUrl(getLogoutURL(idpSSO, bindingURI));
                spType.setLogoutResponseLocation(getLogoutResponseLocation(idpSSO, bindingURI));
            }
        }
        if (serviceURL == null) {
            SPSSODescriptorType spSSO = getSPDescriptor(entityDescriptor);
            if (spSSO != null) {
                serviceURL = getServiceURL(spSSO, bindingURI);
            }
            spType.setServiceURL(serviceURL);
        }
View Full Code Here

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

        SPType spType = new SPType();

        List<Object> list = entitiesDescriptor.getEntityDescriptor();

        IDPSSODescriptorType idpSSO = null;
        SPSSODescriptorType spSSO = null;

        if (list != null) {
            for (Object theObject : list) {
                if (theObject instanceof EntitiesDescriptorType) {
                    spType = getSPConfiguration((EntitiesDescriptorType) theObject, bindingURI);
View Full Code Here

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

    public static SPSSODescriptorType getSPDescriptor(EntityDescriptorType entityDescriptor) {
        List<EDTChoiceType> edtChoices = entityDescriptor.getChoiceType();
        for (EDTChoiceType edt : edtChoices) {
            List<EDTDescriptorChoiceType> edtDescriptors = edt.getDescriptors();
            for (EDTDescriptorChoiceType edtDesc : edtDescriptors) {
                SPSSODescriptorType spSSO = edtDesc.getSpDescriptor();
                if (spSSO != null) {
                    return spSSO;
                }
            }
        }
View Full Code Here

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

            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();
                   
                    idpType.getTrust().addDomain(location.getHost());
                }
            }
View Full Code Here

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

        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,
                attributes, org);
        EntityDescriptorType entity = MetaDataBuilderDelegate.createEntityDescriptor(spSSO);

        ByteArrayOutputStream baos = new ByteArrayOutputStream();
View Full Code Here

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

            // Read SP Metadata if provided
            List<EntityDescriptorType> entityDescriptors = CoreConfigUtil.getMetadataConfiguration(idpConfiguration,
                    getContext().getServletContext());
            if (entityDescriptors != null) {
                for (EntityDescriptorType entityDescriptorType : entityDescriptors) {
                    SPSSODescriptorType spSSODescriptor = CoreConfigUtil.getSPDescriptor(entityDescriptorType);
                    if (spSSODescriptor != null) {
                        spSSOMetadataMap.put(entityDescriptorType.getEntityID(), spSSODescriptor);
                    }
                }
            }
View Full Code Here

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

     *
     * @param spIssuer
     * @return true if signature is not expected in SAMLRequest and so signature validation should be ignored
     */
    private Boolean willIgnoreSignatureOfCurrentRequest(String spIssuer) {
        SPSSODescriptorType currentSPMetadata = spSSOMetadataMap.get(spIssuer);

        if (currentSPMetadata == null) {
            return false;
        }

        Boolean isRequestSigned = currentSPMetadata.isAuthnRequestsSigned();

        logger.trace("Issuer: " + spIssuer + ", isRequestSigned: " + isRequestSigned);

        return !isRequestSigned;
    }
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.