Package org.apache.wss4j.common.saml

Examples of org.apache.wss4j.common.saml.SamlAssertionWrapper.toDOM()


        }
       
        try {
            Document doc = DOMUtils.createDocument();
            SamlAssertionWrapper assertion = createSamlToken(tokenParameters, secret, doc);
            Element token = assertion.toDOM(doc);
           
            // set the token in cache (only if the token is signed)
            byte[] signatureValue = assertion.getSignatureValue();
            if (tokenParameters.getTokenStore() != null && signatureValue != null
                && signatureValue.length > 0) {
View Full Code Here


                }
                ret.add(new SupportingToken(token, sig));               
            } else if (token instanceof SamlToken) {
                SamlAssertionWrapper assertionWrapper = addSamlToken((SamlToken)token);
                if (assertionWrapper != null) {
                    Element assertionElement = assertionWrapper.toDOM(saaj.getSOAPPart());
                    addSupportingElement(assertionElement);
                    ret.add(new SupportingToken(token, assertionWrapper));
                    if (suppTokens.isEncryptedToken()) {
                        WSEncryptionPart part = new WSEncryptionPart(assertionWrapper.getId(), "Element");
                        part.setElement(assertionElement);
View Full Code Here

                    }
                } else if (initiatorToken instanceof SamlToken && isRequestor()) {
                    SamlAssertionWrapper assertionWrapper = addSamlToken((SamlToken)initiatorToken);
                    if (assertionWrapper != null) {
                        if (isTokenRequired(initiatorToken.getIncludeTokenType())) {
                            addSupportingElement(assertionWrapper.toDOM(saaj.getSOAPPart()));
                            storeAssertionAsSecurityToken(assertionWrapper);
                        }
                        assertPolicy(initiatorToken);
                    }
                } else if (initiatorToken instanceof SamlToken) {
View Full Code Here

            } else if (initiatorToken instanceof SamlToken && isRequestor()) {
                try {
                    SamlAssertionWrapper assertionWrapper = addSamlToken((SamlToken)initiatorToken);
                    if (assertionWrapper != null) {
                        if (isTokenRequired(initiatorToken.getIncludeTokenType())) {
                            addSupportingElement(assertionWrapper.toDOM(saaj.getSOAPPart()));
                            storeAssertionAsSecurityToken(assertionWrapper);
                        }
                        assertPolicy(initiatorToken);
                    }
                } catch (Exception e) {
View Full Code Here

        SAMLCallback samlCallback = new SAMLCallback();
        SAMLUtil.doSAMLCallback(samlCallbackHandler, samlCallback);
        SamlAssertionWrapper samlAssertion = new SamlAssertionWrapper(samlCallback);
       
        Document doc = DOMUtils.newDocument();
        samlAssertion.toDOM(doc);
       
        ClaimCollection claims = SAMLUtils.getClaims(samlAssertion);
        assertEquals(claims.getDialect().toString(),
                "http://schemas.xmlsoap.org/ws/2005/05/identity");
        assertEquals(1, claims.size());
View Full Code Here

        SAMLCallback samlCallback = new SAMLCallback();
        SAMLUtil.doSAMLCallback(samlCallbackHandler, samlCallback);
        SamlAssertionWrapper samlAssertion = new SamlAssertionWrapper(samlCallback);
       
        Document doc = DOMUtils.newDocument();
        samlAssertion.toDOM(doc);
       
        ClaimCollection claims = SAMLUtils.getClaims(samlAssertion);
        assertEquals(claims.getDialect().toString(),
                "http://schemas.xmlsoap.org/ws/2005/05/identity");
        assertEquals(1, claims.size());
View Full Code Here

        SAMLCallback samlCallback = new SAMLCallback();
        SAMLUtil.doSAMLCallback(samlCallbackHandler, samlCallback);
        SamlAssertionWrapper samlAssertion = new SamlAssertionWrapper(samlCallback);
       
        Document doc = DOMUtils.newDocument();
        samlAssertion.toDOM(doc);
       
        ClaimCollection claims = SAMLUtils.getClaims(samlAssertion);
        assertEquals(claims.getDialect().toString(),
                "http://schemas.xmlsoap.org/ws/2005/05/identity");
        assertEquals(2, claims.size());
View Full Code Here

        SAMLCallback samlCallback = new SAMLCallback();
        SAMLUtil.doSAMLCallback(samlCallbackHandler, samlCallback);
        SamlAssertionWrapper samlAssertion = new SamlAssertionWrapper(samlCallback);
       
        Document doc = DOMUtils.newDocument();
        samlAssertion.toDOM(doc);
       
        ClaimCollection claims = SAMLUtils.getClaims(samlAssertion);
        assertEquals(claims.getDialect().toString(),
                "http://schemas.xmlsoap.org/ws/2005/05/identity");
        assertEquals(1, claims.size());
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.