Examples of TrustType


Examples of org.openxri.resolve.TrustType

        try
        {
            XRDS tmpXRDS = xriResolver.selectServiceFromXRD(
                baseXRD,
                identifier.getXriIdentifier(),
                new TrustType(),
                srvType,
                null, // sepMediaType
                true, // followRefs
                new ResolverState()
            );
View Full Code Here

Examples of org.picketlink.config.federation.TrustType

    private volatile boolean external;
    private volatile boolean supportMetadata;

    public IDPConfiguration(String alias) {
        this.alias = alias;
        setTrust(new TrustType());
        getTrust().setDomains("");
    }
View Full Code Here

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

    public void isTrusted(String issuer) throws IssuerNotTrustedException {
        if (idpConfiguration == null)
            throw logger.nullValueError("IDP Configuration");
        try {
            String issuerDomain = getDomain(issuer);
            TrustType idpTrust = idpConfiguration.getTrust();
            if (idpTrust != null) {
                String domainsTrusted = idpTrust.getDomains();
                logger.trace("Domains that IDP trusts = " + domainsTrusted + " and issuer domain = " + issuerDomain);
                if (domainsTrusted.indexOf(issuerDomain) < 0) {
                    // Let us do string parts checking
                    StringTokenizer st = new StringTokenizer(domainsTrusted, ",");
                    while (st != null && st.hasMoreTokens()) {
View Full Code Here

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

        }
        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.TrustType

        SPType sp = new SPType();
        sp.setIdentityURL(props.getProperty("idp.url"));
        sp.setServiceURL("service.url");
        String domains = props.getProperty("domains");
        if (StringUtil.isNotNull(domains)) {
            TrustType trustType = new TrustType();
            trustType.setDomains(domains);
            sp.setTrust(trustType);
        }

        return sp;
    }
View Full Code Here

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

     * @param idpType
     * @param entities
     */
    private void configureTrustedDomainsFromMetadata(IDPType idpType, EntitiesDescriptorType entities) {
        if (idpType.getTrust() == null) {
            idpType.setTrust(new TrustType());
        }
       
        for (Object entityDescriptorObj : entities.getEntityDescriptor()) {
            EntityDescriptorType entityDescriptorType = (EntityDescriptorType) entityDescriptorObj;
            SPSSODescriptorType spDescriptor = CoreConfigUtil.getSPDescriptor(entityDescriptorType);
View Full Code Here

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

         * 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.TrustType

        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.TrustType

        MockHttpServletRequest servletRequest = new MockHttpServletRequest(session, "POST");
        MockHttpServletResponse servletResponse = new MockHttpServletResponse();
        HTTPContext httpContext = new HTTPContext(servletRequest, servletResponse, servletContext);

        // Create chainConfig for IDP
        TrustType trustType = new TrustType();
        Map<String, Object> chainOptionsIdp = new HashMap<String, Object>();
        IDPType idpType = new IDPType();
        idpType.setTrust(trustType);
        chainOptionsIdp.put(GeneralConstants.CONFIGURATION, idpType);
        SAML2HandlerChainConfig chainConfigIdp = new DefaultSAML2HandlerChainConfig(chainOptionsIdp);
        issuerTrustHandler.initChainConfig(chainConfigIdp);

        // Create documentHolder
        NameIDType issuer = new NameIDType();
        AuthnRequestType authnRequestType = new AuthnRequestType("ID_123456789", null);
        authnRequestType.setIssuer(issuer);
        SAMLDocumentHolder documentHolder = new SAMLDocumentHolder(authnRequestType);

        // Create request and response
        SAML2HandlerRequest request = new DefaultSAML2HandlerRequest(httpContext, null, documentHolder,
              SAML2Handler.HANDLER_TYPE.IDP);
        SAML2HandlerResponse response = new DefaultSAML2HandlerResponse();

        // Test localhost
        issuer.setValue("http://localhost:8080/sales");
        trustType.setDomains("localhost,google.com,somedomain.com");
        issuerTrustHandler.handleRequestType(request, response);

        // Test somedomain
        issuer.setValue("http://www.somedomain.com:8080/sales/");
        issuerTrustHandler.handleRequestType(request, response);
View Full Code Here

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

        private void trustIssuer(IDPType idpConfiguration, String issuer) throws ProcessingException {
            if (idpConfiguration == null)
                throw logger.nullArgumentError("IDP Configuration");
            try {
                String issuerDomain = getDomain(issuer);
                TrustType idpTrust = idpConfiguration.getTrust();
                if (idpTrust != null) {
                    String domainsTrusted = idpTrust.getDomains();

                    logger.trace("Domains that IDP trusts = " + domainsTrusted + " and issuer domain = " + issuerDomain);
                   
                    if (domainsTrusted.indexOf(issuerDomain) < 0) {
                        // Let us do string parts checking
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.