Examples of IDPType


Examples of org.jboss.identity.federation.core.config.IDPType

  
   private class IDPTrustHandler
  
      public void handleRequestType(SAML2HandlerRequest request, SAML2HandlerResponse response) throws ProcessingException
      {
         IDPType idpConfiguration = (IDPType) request.getOptions().get(GeneralConstants.CONFIGURATION);
         String issuer = request.getIssuer().getValue();
        
         trustIssuer(idpConfiguration, issuer);  
      }
View Full Code Here

Examples of org.jboss.identity.federation.core.config.IDPType


      public void handleStatusResponseType(SAML2HandlerRequest request, SAML2HandlerResponse response)
      throws ProcessingException
      {
         IDPType idpConfiguration = (IDPType) request.getOptions().get(GeneralConstants.CONFIGURATION);
         String issuer = request.getIssuer().getValue();
        
         trustIssuer(idpConfiguration, issuer);
      }
View Full Code Here

Examples of org.picketlink.config.federation.IDPType

        if (providerType instanceof IDPConfiguration) {
            IDPConfiguration configuration = (IDPConfiguration) providerType;

            if (configuration.isSupportMetadata()) {
                try {
                    IDPType metadataConfig = new IDPMetadataConfigurationProvider().getIDPConfiguration();

                    metadataConfig.importFrom(configuration);

                    providerType = metadataConfig;
                } catch (ProcessingException e) {
                    throw PicketLinkLogger.ROOT_LOGGER.federationSAMLMetadataConfigError(configuration.getAlias(), e);
                }
View Full Code Here

Examples of org.picketlink.identity.federation.core.config.IDPType

     *
     * @param idpSSODescriptor
     * @return
     */
    public static IDPType getIDPType(IDPSSODescriptorType idpSSODescriptor) {
        IDPType idp = new IDPType();

        List<EndpointType> endpoints = idpSSODescriptor.getSingleSignOnService();

        if (endpoints != null) {
            for (EndpointType endpoint : endpoints) {
                if (endpoint.getBinding().toString().equals(JBossSAMLURIConstants.SAML_HTTP_POST_BINDING.get())) {
                    idp.setIdentityURL(endpoint.getLocation().toString());
                    break;
                }
            }
        }

        if (StringUtil.isNullOrEmpty(idp.getIdentityURL())) {
            throw logger.nullValueError("identity url");
        }
        return idp;
    }
View Full Code Here

Examples of org.picketlink.identity.federation.core.config.IDPType

        try {
            props.load(is);
        } catch (IOException e) {
            throw logger.processingError(e);
        }
        IDPType idp = new IDPType();
        idp.setIdentityURL(props.getProperty("idp.url"));
        String domains = props.getProperty("domains");
        if (StringUtil.isNotNull(domains)) {
            TrustType trustType = new TrustType();
            trustType.setDomains(domains);
            idp.setTrust(trustType);
        }

        return idp;
    }
View Full Code Here

Examples of org.picketlink.identity.federation.core.config.IDPType

    /**
     * @see SAMLConfigurationProvider#getIDPConfiguration()
     */
    public IDPType getIDPConfiguration() throws ProcessingException {
        IDPType idpType = null;
        if (fileAvailable()) {
            try {
                EntitiesDescriptorType entities = parseMDFile();
                IDPSSODescriptorType idpSSO = CoreConfigUtil.getIDPDescriptor(entities);
               
                if (idpSSO != null) {
                    idpType = CoreConfigUtil.getIDPType(idpSSO);
                }
               
                configureTrustedDomainsFromMetadata(idpType, entities);
            } catch (ParsingException e) {
                throw logger.processingError(e);
            }
        } else {
            throw logger.nullValueError(IDP_MD_FILE);
        }

        if (configParsedIDPType != null) {
            idpType.importFrom(configParsedIDPType);
        }

        return idpType;
    }
View Full Code Here

Examples of org.picketlink.identity.federation.core.config.IDPType

     * @return
     */
    private IDPWebBrowserSSOValve createIDPAuthenticator(boolean supportsSignatures) throws Exception {
        IDPWebBrowserSSOValve idpAuthenticator = new IDPWebBrowserSSOValve();

        IDPType idpType = new IDPType();

        idpType.setIdentityURL("http://localhost/idp");
        idpType.setSupportsSignature(supportsSignatures);

        idpAuthenticator.setConfigProvider(new MockSAMLConfigurationProvider(idpType));
        idpAuthenticator.setContainer(this.idpContext);

        idpAuthenticator.start();
View Full Code Here

Examples of org.picketlink.identity.federation.core.config.IDPType

        /*
         * assertTrue(object instanceof JAXBElement);
         *
         * IDPType idp = ((JAXBElement<IDPType>) object).getValue();
         */
        IDPType idp = (IDPType) object;
        assertEquals("org.picketlink.identity.federation.bindings.tomcat.TomcatRoleGenerator", idp.getRoleGenerator());

        TrustType trust = idp.getTrust();
        assertNotNull("Trust is not null", trust);
        String domains = trust.getDomains();
        assertTrue("localhost trusted", domains.indexOf("localhost") > -1);
        assertTrue("jboss.com trusted", domains.indexOf("jboss.com") > -1);
    }
View Full Code Here

Examples of org.picketlink.identity.federation.core.config.IDPType

    @Test
    public void test02() throws Exception {
        Object object = this.unmarshall(config + "2.xml");
        assertNotNull("IDP is not null", object);

        IDPType idp = (IDPType) object;
        assertEquals("somefqn", idp.getRoleGenerator());
        assertTrue(idp.isEncrypt());
        assertEquals(CanonicalizationMethod.EXCLUSIVE, idp.getCanonicalizationMethod());
        KeyProviderType kp = idp.getKeyProvider();
        assertNotNull("KeyProvider is not null", kp);
        assertEquals("SomeClass", "SomeClass", kp.getClassName());
        List<AuthPropertyType> authProps = kp.getAuth();
        AuthPropertyType authProp = authProps.get(0);
        assertEquals("SomeKey", "SomeKey", authProp.getKey());
        assertEquals("SomeValue", "SomeValue", authProp.getValue());

        authProp = authProps.get(1);
        assertEquals("DBURL", "DBURL", authProp.getKey());
        assertEquals("SomeDBURL", "SomeDBURL", authProp.getValue());

        List<KeyValueType> validatingAliases = kp.getValidatingAlias();
        assertEquals("Validating Alias length is 2", 2, validatingAliases.size());

        KeyValueType kv = validatingAliases.get(0);
        assertEquals("localhost", kv.getKey());
        assertEquals("localhostalias", kv.getValue());

        kv = validatingAliases.get(1);
        assertEquals("jboss.com", kv.getKey());
        assertEquals("jbossalias", kv.getValue());

        TrustType trust = idp.getTrust();
        assertNotNull("Trust is not null", trust);
        String domains = trust.getDomains();
        assertTrue("localhost trusted", domains.indexOf("localhost") > -1);
        assertTrue("jboss.com trusted", domains.indexOf("jboss.com") > -1);
    }
View Full Code Here

Examples of org.picketlink.identity.federation.core.config.IDPType

        InputStream configStream = tcl.getResourceAsStream("parser/config/picketlink-idp.xml");
        PicketLinkConfigParser parser = new PicketLinkConfigParser();
        Object result = parser.parse(configStream);
        assertNotNull(result);
        PicketLinkType picketlink = (PicketLinkType) result;
        IDPType idp = (IDPType) picketlink.getIdpOrSP();
        assertNotNull(idp);
        assertTrue(picketlink.isEnableAudit());
       
        // asserts the StrictPostBinding attribute. Default is true, but for this test it was changed to true in the configuration file.
        assertFalse(idp.isStrictPostBinding());
       
        assertEquals("TestIdentityParticipantStack", idp.getIdentityParticipantStack());
    }
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.