Examples of SPSSODescriptorType


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

            IDPSSODescriptorType idp = (IDPSSODescriptorType) rdt;
            builder.append(toString(idp));
         }
         if(rdt instanceof SPSSODescriptorType)
         {
            SPSSODescriptorType sp = (SPSSODescriptorType) rdt;
            builder.append(toString(sp));
         }
      }
     
      return builder.toString();
View Full Code Here

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

         KeyDescriptorType keyDescriptorType, 
         EndpointType sloEndPoint,
         List<AttributeType> attributes,
         OrganizationType org)
   {
      SPSSODescriptorType sp = oFact.createSPSSODescriptorType();
      sp.getSingleLogoutService().add(sloEndPoint);
      sp.getKeyDescriptor().add(keyDescriptorType);
      sp.setAuthnRequestsSigned(requestsSigned);
      sp.setOrganization(org);
      return sp;
   }
View Full Code Here

Examples of org.jboss.seam.security.external.jaxb.samlv2.metadata.SPSSODescriptorType

            IndexedEndpointType acsPostEndpoint = metaDataFactory.createIndexedEndpointType();
            acsPostEndpoint.setBinding(SamlConstants.HTTP_POST_BINDING);
            acsPostEndpoint.setLocation(getServiceURL(SamlServiceType.SAML_ASSERTION_CONSUMER_SERVICE));

            SPSSODescriptorType spSsoDescriptor = metaDataFactory.createSPSSODescriptorType();

            spSsoDescriptor.getAssertionConsumerService().add(acsRedirectEndpoint);
            spSsoDescriptor.getAssertionConsumerService().add(acsPostEndpoint);
            addSloEndpointsToMetaData(spSsoDescriptor);

            spSsoDescriptor.setAuthnRequestsSigned(isAuthnRequestsSigned());
            spSsoDescriptor.setWantAssertionsSigned(isWantAssertionsSigned());

            spSsoDescriptor.getProtocolSupportEnumeration().add(SamlConstants.PROTOCOL_NSURI);

            addNameIDFormatsToMetaData(spSsoDescriptor);

            if (getSigningKey() != null) {
                addKeyDescriptorToMetaData(spSsoDescriptor);
View Full Code Here

Examples of org.jboss.seam.security.external.jaxb.samlv2.metadata.SPSSODescriptorType

    }

    public SamlExternalServiceProvider addExternalSamlEntity(Reader reader) {
        EntityDescriptorType entityDescriptor = readEntityDescriptor(reader);
        String entityId = entityDescriptor.getEntityID();
        SPSSODescriptorType SPSSODescriptor = (SPSSODescriptorType) entityDescriptor.getRoleDescriptorOrIDPSSODescriptorOrSPSSODescriptor().get(0);
        return addExternalServiceProvider(entityId, SPSSODescriptor);
    }
View Full Code Here

Examples of org.jboss.seam.security.external.jaxb.samlv2.metadata.SPSSODescriptorType

   public SamlExternalServiceProvider addExternalSamlEntity(Reader reader)
   {
      EntityDescriptorType entityDescriptor = readEntityDescriptor(reader);
      String entityId = entityDescriptor.getEntityID();
      SPSSODescriptorType SPSSODescriptor = (SPSSODescriptorType) entityDescriptor.getRoleDescriptorOrIDPSSODescriptorOrSPSSODescriptor().get(0);
      return addExternalServiceProvider(entityId, SPSSODescriptor);
   }
View Full Code Here

Examples of org.jboss.seam.security.external.jaxb.samlv2.metadata.SPSSODescriptorType

         IndexedEndpointType acsPostEndpoint = metaDataFactory.createIndexedEndpointType();
         acsPostEndpoint.setBinding(SamlConstants.HTTP_POST_BINDING);
         acsPostEndpoint.setLocation(getServiceURL(SamlServiceType.SAML_ASSERTION_CONSUMER_SERVICE));

         SPSSODescriptorType spSsoDescriptor = metaDataFactory.createSPSSODescriptorType();

         spSsoDescriptor.getAssertionConsumerService().add(acsRedirectEndpoint);
         spSsoDescriptor.getAssertionConsumerService().add(acsPostEndpoint);
         addSloEndpointsToMetaData(spSsoDescriptor);

         spSsoDescriptor.setAuthnRequestsSigned(isAuthnRequestsSigned());
         spSsoDescriptor.setWantAssertionsSigned(isWantAssertionsSigned());

         spSsoDescriptor.getProtocolSupportEnumeration().add(SamlConstants.PROTOCOL_NSURI);

         addNameIDFormatsToMetaData(spSsoDescriptor);

         if (getSigningKey() != null)
         {
View Full Code Here

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

            app.setFullScopeAllowed(true);
            app.setProtocol(SamlProtocol.LOGIN_PROTOCOL);
            app.setAttribute(SamlProtocol.SAML_SERVER_SIGNATURE, SamlProtocol.ATTRIBUTE_TRUE_VALUE); // default to true
            app.setAttribute(SamlProtocol.SAML_SIGNATURE_ALGORITHM, SignatureAlgorithm.RSA_SHA256.toString());
            app.setAttribute(SamlProtocol.SAML_AUTHNSTATEMENT, SamlProtocol.ATTRIBUTE_TRUE_VALUE);
            SPSSODescriptorType spDescriptorType = CoreConfigUtil.getSPDescriptor(entity);
            if (spDescriptorType.isWantAssertionsSigned()) {
                app.setAttribute(SamlProtocol.SAML_ASSERTION_SIGNATURE, SamlProtocol.ATTRIBUTE_TRUE_VALUE);
            }
            String adminUrl = getLogoutLocation(spDescriptorType, JBossSAMLURIConstants.SAML_HTTP_POST_BINDING.get());
            if (adminUrl != null) app.setManagementUrl(adminUrl);

            String urlPattern = CoreConfigUtil.getServiceURL(spDescriptorType, JBossSAMLURIConstants.SAML_HTTP_POST_BINDING.get());
            if (urlPattern == null) {
                urlPattern = CoreConfigUtil.getServiceURL(spDescriptorType, JBossSAMLURIConstants.SAML_HTTP_REDIRECT_BINDING.get());
            }
            if (urlPattern != null) {
                app.addRedirectUri(urlPattern);
            }

            for (KeyDescriptorType keyDescriptor : spDescriptorType.getKeyDescriptor()) {
                X509Certificate cert = null;
                try {
                    cert = SAMLMetadataUtil.getCertificate(keyDescriptor);
                } catch (ConfigurationException e) {
                    throw new RuntimeException(e);
View Full Code Here

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

    public void testFileBasedEntityMetadataProvider() {
        FileBasedEntityMetadataProvider metadataProvider = new FileBasedEntityMetadataProvider();
        EntityDescriptorType metadata = getMetadata(metadataProvider, "saml2/metadata/sp-entitydescriptor.xml");

        assertEquals(metadata.getEntityID(), "https://service.example.org/shibboleth");
        SPSSODescriptorType spSSODescriptor = CoreConfigUtil.getSPDescriptor(metadata);
        assertNull(spSSODescriptor.isAuthnRequestsSigned());
        assertEquals(spSSODescriptor.getSingleLogoutService().size(), 4);
    }
View Full Code Here

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

            }

            EntityDescriptorType entDescriptorType = (EntityDescriptorType)descriptorType;

            if ("https://saml.salesforce.com".equals(entDescriptorType.getEntityID())) {
                SPSSODescriptorType spDescriptor = CoreConfigUtil.getSPDescriptor(entDescriptorType);

                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());
                List<EndpointType> logoutEndpoints = spDescriptor.getSingleLogoutService();
                assertNotNull(logoutEndpoints);
                assertEquals(logoutEndpoints.size(), 0);
            }
            else {
                fail("Wrong entityID: " + entDescriptorType.getEntityID());
View Full Code Here

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

    public void testCreateEntityDescriptor() {
        IDPSSODescriptorType idp = this.createIDPSSODescriptor();
        EntityDescriptorType idpEntity = MetaDataBuilder.createEntityDescriptor(idp);
        assertNotNull("IDP Entity Descriptor not null", idpEntity);

        SPSSODescriptorType sp = this.createSPSSODescriptor();
        EntityDescriptorType spEntity = MetaDataBuilder.createEntityDescriptor(sp);
        assertNotNull("SP Entity Descriptor not null", spEntity);
    }
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.