Examples of verifySignature()


Examples of org.apache.ws.security.saml.ext.AssertionWrapper.verifySignature()

            requestData.setCallbackHandler(callbackHandler);
            requestData.setMsgContext(tokenParameters.getWebServiceContext().getMessageContext());
            requestData.setSubjectCertConstraints(certConstraints.getCompiledSubjectContraints());

            // Verify the signature
            assertion.verifySignature(
                requestData, new WSDocInfo(validateTargetElement.getOwnerDocument())
            );
               
            SecurityToken secToken = null;
            byte[] signatureValue = assertion.getSignatureValue();
View Full Code Here

Examples of org.apache.ws.security.saml.ext.AssertionWrapper.verifySignature()

                algorithmSuiteValidator.checkSignatureAlgorithms(xmlSignature);
                algorithmSuiteValidator.checkAsymmetricKeyLength(key);
            }

            assertion.verifySignature(samlKeyInfo);
        }
        // Parse the HOK subject if it exists
        assertion.parseHOKSubject(data, docInfo);
           
        // Now delegate the rest of the verification to the Validator
View Full Code Here

Examples of org.apache.ws.security.saml.ext.AssertionWrapper.verifySignature()

                WSSConfig wssConfig = WSSConfig.getNewInstance();
                requestData.setWssConfig(wssConfig);
                requestData.setCallbackHandler(callbackHandler);
               
                // Verify the signature
                assertion.verifySignature(
                    requestData, new WSDocInfo(validateTargetElement.getOwnerDocument())
                );
               
                // Validate the assertion against schemas/profiles
                validateAssertion(assertion);
View Full Code Here

Examples of org.apache.ws.security.saml.ext.AssertionWrapper.verifySignature()

                WSSConfig wssConfig = WSSConfig.getNewInstance();
                requestData.setWssConfig(wssConfig);
                requestData.setCallbackHandler(callbackHandler);
               
                // Verify the signature
                assertion.verifySignature(
                    requestData, new WSDocInfo(validateTargetElement.getOwnerDocument())
                );

                // Now verify trust on the signature
                Credential trustCredential = new Credential();
View Full Code Here

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

                algorithmSuiteValidator.checkSignatureAlgorithms(xmlSignature);
                algorithmSuiteValidator.checkAsymmetricKeyLength(key);
            }

            samlAssertion.verifySignature(samlKeyInfo);
        }
        // Parse the subject if it exists
        samlAssertion.parseSubject(
            new WSSSAMLKeyInfoProcessor(data, docInfo), data.getSigVerCrypto(),
            data.getCallbackHandler()
View Full Code Here

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

            KeyInfo keyInfo = sig.getKeyInfo();
            SAMLKeyInfo samlKeyInfo =
                SAMLUtil.getCredentialFromKeyInfo(
                    keyInfo.getDOM(), new WSSSAMLKeyInfoProcessor(requestData, docInfo), sigCrypto
                );
            assertion.verifySignature(samlKeyInfo);
               
            SecurityToken secToken = null;
            byte[] signatureValue = assertion.getSignatureValue();
            if (tokenParameters.getTokenStore() != null && signatureValue != null
                && signatureValue.length > 0) {
View Full Code Here

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

       
        Element assertionElement = samlAssertion.toDOM(doc);
        doc.appendChild(assertionElement);
       
        samlAssertion = new SamlAssertionWrapper(assertionElement);
        samlAssertion.verifySignature(keyInfo);
    }

    /**
     * Test that creates an SamlAssertionWrapper object and signs using custom
     * signature and canonicalization algorithms.
View Full Code Here

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

        CryptoType cryptoType = new CryptoType(CryptoType.TYPE.ALIAS);
        cryptoType.setAlias("client_certchain");
        keyInfo.setCerts(issuerCrypto.getX509Certificates(cryptoType));
       
        samlAssertion = new SamlAssertionWrapper(assertionElement);
        samlAssertion.verifySignature(keyInfo);
    }
   
}
View Full Code Here

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

                algorithmSuiteValidator.checkSignatureAlgorithms(xmlSignature);
                algorithmSuiteValidator.checkAsymmetricKeyLength(key);
            }

            samlAssertion.verifySignature(samlKeyInfo);
        }
        // Parse the subject if it exists
        samlAssertion.parseSubject(
            new WSSSAMLKeyInfoProcessor(data, docInfo), data.getSigVerCrypto(),
            data.getCallbackHandler()
View Full Code Here

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

                algorithmSuiteValidator.checkSignatureAlgorithms(xmlSignature);
                algorithmSuiteValidator.checkAsymmetricKeyLength(key);
            }

            samlAssertion.verifySignature(samlKeyInfo);
        }
        // Parse the HOK subject if it exists
        samlAssertion.parseHOKSubject(
            new WSSSAMLKeyInfoProcessor(data, docInfo), data.getSigVerCrypto(),
            data.getCallbackHandler()
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.