Examples of parseHOKSubject()


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

            // Verify the signature
            WSDocInfo docInfo = new WSDocInfo(token.getOwnerDocument());
            assertion.verifySignature(requestData, docInfo);
           
            // Parse the HOK subject if it exists
            assertion.parseHOKSubject(requestData, docInfo);

            // Now verify trust on the signature
            Credential trustCredential = new Credential();
            SAMLKeyInfo samlKeyInfo = assertion.getSignatureKeyInfo();
            trustCredential.setPublicKey(samlKeyInfo.getPublicKey());
View Full Code Here

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

        AssertionWrapper assertion = new AssertionWrapper(token);
        if (assertion.isSigned()) {
            assertion.verifySignature(data, docInfo);
        }
        // Parse the HOK subject if it exists
        assertion.parseHOKSubject(data, docInfo);
           
        // Now delegate the rest of the verification to the Validator
        Credential credential = new Credential();
        credential.setAssertion(assertion);
        if (validator != null) {
View Full Code Here

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

                            (AssertionWrapper)samlResult.get(0).get(
                                WSSecurityEngineResult.TAG_SAML_ASSERTION
                            );
                    } else {
                        assertion = new AssertionWrapper(processedToken);
                        assertion.parseHOKSubject(data, wsDocInfo);
                    }
                    if (bspCompliant) {
                        BSPEnforcer.checkSamlTokenBSPCompliance(secRef, assertion);
                    }
                    SAMLKeyInfo keyInfo = assertion.getSubjectKeyInfo();
View Full Code Here

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

                            (AssertionWrapper)samlResult.get(0).get(
                                WSSecurityEngineResult.TAG_SAML_ASSERTION
                            );
                    } else {
                        assertion = new AssertionWrapper(processedToken);
                        assertion.parseHOKSubject(data, wsDocInfo);
                    }
                    if (bspCompliant) {
                        BSPEnforcer.checkSamlTokenBSPCompliance(secRef, assertion);
                    }
                    SAMLKeyInfo keyInfo = assertion.getSubjectKeyInfo();
View Full Code Here

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

       
        data.setDecCrypto(CryptoFactory.getInstance(properties));
        data.setCallbackHandler(new PasswordCallbackHandler());
        data.setWssConfig(WSSConfig.getNewInstance());
       
        assertionWrapper.parseHOKSubject(data, new WSDocInfo(assertion.getOwnerDocument()));
        SAMLKeyInfo samlKeyInfo = assertionWrapper.getSubjectKeyInfo();
        assertTrue(Arrays.equals(secret, samlKeyInfo.getSecret()));
    }
   
   
View Full Code Here

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

                            (SamlAssertionWrapper)samlResult.get(0).get(
                                WSSecurityEngineResult.TAG_SAML_ASSERTION
                            );
                    } else {
                        samlAssertion = new SamlAssertionWrapper(processedToken);
                        samlAssertion.parseHOKSubject(
                            new WSSSAMLKeyInfoProcessor(data, wsDocInfo),
                            data.getSigVerCrypto(), data.getCallbackHandler()
                        );
                    }
                    STRParserUtil.checkSamlTokenBSPCompliance(secRef, samlAssertion, data.getBSPEnforcer());
View Full Code Here

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

            }

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

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

       
        data.setDecCrypto(CryptoFactory.getInstance(properties));
        data.setCallbackHandler(new PasswordCallbackHandler());
        data.setWssConfig(WSSConfig.getNewInstance());
       
        assertionWrapper.parseHOKSubject(
            new WSSSAMLKeyInfoProcessor(data, new WSDocInfo(assertion.getOwnerDocument())),
                                        data.getSigVerCrypto(), data.getCallbackHandler()
        );
       
        SAMLKeyInfo samlKeyInfo = assertionWrapper.getSubjectKeyInfo();
View Full Code Here

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

            throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE);
        }

        Document doc = transformedToken.getElement().getOwnerDocument();
       
        transformedToken.parseHOKSubject(
            new WSSSAMLKeyInfoProcessor(data, new WSDocInfo(doc)), data.getSigVerCrypto(),
            data.getCallbackHandler()
        );
        SAMLKeyInfo keyInfo = transformedToken.getSubjectKeyInfo();
        byte[] secret = keyInfo.getSecret();
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.