Examples of IssuedTokenPolicyValidator


Examples of org.apache.cxf.ws.security.wss4j.policyvalidators.IssuedTokenPolicyValidator

            List<WSSecurityEngineResult> signedResults = new ArrayList<WSSecurityEngineResult>();
            WSSecurityUtil.fetchAllActionResults(
                rResult.getResults(), WSConstants.SIGN, signedResults
            );
           
            IssuedTokenPolicyValidator issuedValidator =
                new IssuedTokenPolicyValidator(signedResults, message);
            Collection<AssertionInfo> issuedAis = aim.get(SP12Constants.ISSUED_TOKEN);

            for (AssertionWrapper assertionWrapper : findSamlTokenResults(rResult.getResults())) {
                boolean valid = issuedValidator.validatePolicy(issuedAis, assertionWrapper);
                if (valid) {
                    SecurityToken token = createSecurityToken(assertionWrapper);
                    getTokenStore(message).add(token);
                    message.getExchange().remove(SecurityConstants.TOKEN);
                    message.getExchange().put(SecurityConstants.TOKEN_ID, token.getId());
                    return;
                }
            }
            for (BinarySecurity binarySecurityToken : findBinarySecurityTokenResults(rResult.getResults())) {
                boolean valid = issuedValidator.validatePolicy(issuedAis, binarySecurityToken);
                if (valid) {
                    SecurityToken token = createSecurityToken(binarySecurityToken);
                    getTokenStore(message).add(token);
                    message.getExchange().remove(SecurityConstants.TOKEN);
                    message.getExchange().put(SecurityConstants.TOKEN_ID, token.getId());
View Full Code Here

Examples of org.apache.cxf.ws.security.wss4j.policyvalidators.IssuedTokenPolicyValidator

            List<WSSecurityEngineResult> signedResults = new ArrayList<WSSecurityEngineResult>();
            WSSecurityUtil.fetchAllActionResults(
                rResult.getResults(), WSConstants.SIGN, signedResults
            );
           
            IssuedTokenPolicyValidator issuedValidator =
                new IssuedTokenPolicyValidator(signedResults, message);
            Collection<AssertionInfo> issuedAis = aim.get(SP12Constants.ISSUED_TOKEN);

            for (AssertionWrapper assertionWrapper : findSamlTokenResults(rResult.getResults())) {
                boolean valid = issuedValidator.validatePolicy(issuedAis, assertionWrapper);
                if (valid) {
                    SecurityToken token = createSecurityToken(assertionWrapper);
                    getTokenStore(message).add(token);
                    message.getExchange().remove(SecurityConstants.TOKEN);
                    message.getExchange().put(SecurityConstants.TOKEN_ID, token.getId());
                    return;
                }
            }
            for (BinarySecurity binarySecurityToken : findBinarySecurityTokenResults(rResult.getResults())) {
                boolean valid = issuedValidator.validatePolicy(issuedAis, binarySecurityToken);
                if (valid) {
                    SecurityToken token = createSecurityToken(binarySecurityToken);
                    getTokenStore(message).add(token);
                    message.getExchange().remove(SecurityConstants.TOKEN);
                    message.getExchange().put(SecurityConstants.TOKEN_ID, token.getId());
View Full Code Here

Examples of org.apache.cxf.ws.security.wss4j.policyvalidators.IssuedTokenPolicyValidator

            AssertionInfoMap aim
        ) {
            List<WSSecurityEngineResult> signedResults =
                WSSecurityUtil.fetchAllActionResults(rResult.getResults(), WSConstants.SIGN);
           
            IssuedTokenPolicyValidator issuedValidator =
                new IssuedTokenPolicyValidator(signedResults, message);
            Collection<AssertionInfo> issuedAis =
                NegotiationUtils.getAllAssertionsByLocalname(aim, SPConstants.ISSUED_TOKEN);

            for (SamlAssertionWrapper assertionWrapper : findSamlTokenResults(rResult.getResults())) {
                boolean valid = issuedValidator.validatePolicy(issuedAis, assertionWrapper);
                if (valid) {
                    SecurityToken token = createSecurityToken(assertionWrapper);
                    WSS4JUtils.getTokenStore(message).add(token);
                    message.getExchange().remove(SecurityConstants.TOKEN);
                    message.getExchange().put(SecurityConstants.TOKEN_ID, token.getId());
                    return;
                }
            }
            for (BinarySecurity binarySecurityToken : findBinarySecurityTokenResults(rResult.getResults())) {
                boolean valid = issuedValidator.validatePolicy(issuedAis, binarySecurityToken);
                if (valid) {
                    SecurityToken token = createSecurityToken(binarySecurityToken);
                    WSS4JUtils.getTokenStore(message).add(token);
                    message.getExchange().remove(SecurityConstants.TOKEN);
                    message.getExchange().put(SecurityConstants.TOKEN_ID, token.getId());
View Full Code Here

Examples of org.apache.cxf.ws.security.wss4j.policyvalidators.IssuedTokenPolicyValidator

            List<WSSecurityEngineResult> signedResults = new ArrayList<WSSecurityEngineResult>();
            WSSecurityUtil.fetchAllActionResults(
                rResult.getResults(), WSConstants.SIGN, signedResults
            );
           
            IssuedTokenPolicyValidator issuedValidator =
                new IssuedTokenPolicyValidator(signedResults, message);

            for (AssertionWrapper assertionWrapper : findSamlTokenResults(rResult.getResults())) {
                boolean valid = issuedValidator.validatePolicy(issuedAis, assertionWrapper);
                if (valid) {
                    SecurityToken token = createSecurityToken(assertionWrapper);
                    message.getExchange().put(SecurityConstants.TOKEN, token);
                    return;
                }
            }
            for (BinarySecurity binarySecurityToken : findBinarySecurityTokenResults(rResult.getResults())) {
                boolean valid = issuedValidator.validatePolicy(issuedAis, binarySecurityToken);
                if (valid) {
                    SecurityToken token = createSecurityToken(binarySecurityToken);
                    message.getExchange().put(SecurityConstants.TOKEN, token);
                    return;
                }
View Full Code Here

Examples of org.apache.cxf.ws.security.wss4j.policyvalidators.IssuedTokenPolicyValidator

            List<WSSecurityEngineResult> signedResults = new ArrayList<WSSecurityEngineResult>();
            WSSecurityUtil.fetchAllActionResults(
                rResult.getResults(), WSConstants.SIGN, signedResults
            );
           
            IssuedTokenPolicyValidator issuedValidator =
                new IssuedTokenPolicyValidator(signedResults, message);
            Collection<AssertionInfo> issuedAis = aim.get(SP12Constants.ISSUED_TOKEN);

            for (AssertionWrapper assertionWrapper : findSamlTokenResults(rResult.getResults())) {
                boolean valid = issuedValidator.validatePolicy(issuedAis, assertionWrapper);
                if (valid) {
                    SecurityToken token = createSecurityToken(assertionWrapper);
                    message.getExchange().put(SecurityConstants.TOKEN, token);
                    return;
                }
            }
            for (BinarySecurity binarySecurityToken : findBinarySecurityTokenResults(rResult.getResults())) {
                boolean valid = issuedValidator.validatePolicy(issuedAis, binarySecurityToken);
                if (valid) {
                    SecurityToken token = createSecurityToken(binarySecurityToken);
                    message.getExchange().put(SecurityConstants.TOKEN, token);
                    return;
                }
View Full Code Here

Examples of org.apache.cxf.ws.security.wss4j.policyvalidators.IssuedTokenPolicyValidator

            AssertionInfoMap aim
        ) {
            List<WSSecurityEngineResult> signedResults =
                WSS4JUtils.fetchAllActionResults(rResult.getResults(), WSConstants.SIGN);
           
            IssuedTokenPolicyValidator issuedValidator =
                new IssuedTokenPolicyValidator(signedResults, message);
            Collection<AssertionInfo> issuedAis = aim.get(SP12Constants.ISSUED_TOKEN);

            for (AssertionWrapper assertionWrapper : findSamlTokenResults(rResult.getResults())) {
                boolean valid = issuedValidator.validatePolicy(issuedAis, assertionWrapper);
                if (valid) {
                    SecurityToken token = createSecurityToken(assertionWrapper);
                    getTokenStore(message).add(token);
                    message.getExchange().remove(SecurityConstants.TOKEN);
                    message.getExchange().put(SecurityConstants.TOKEN_ID, token.getId());
                    return;
                }
            }
            for (BinarySecurity binarySecurityToken : findBinarySecurityTokenResults(rResult.getResults())) {
                boolean valid = issuedValidator.validatePolicy(issuedAis, binarySecurityToken);
                if (valid) {
                    SecurityToken token = createSecurityToken(binarySecurityToken);
                    getTokenStore(message).add(token);
                    message.getExchange().remove(SecurityConstants.TOKEN);
                    message.getExchange().put(SecurityConstants.TOKEN_ID, token.getId());
View Full Code Here

Examples of org.apache.cxf.ws.security.wss4j.policyvalidators.IssuedTokenPolicyValidator

            List<WSSecurityEngineResult> signedResults = new ArrayList<WSSecurityEngineResult>();
            WSSecurityUtil.fetchAllActionResults(
                rResult.getResults(), WSConstants.SIGN, signedResults
            );
           
            IssuedTokenPolicyValidator issuedValidator =
                new IssuedTokenPolicyValidator(signedResults, message);
            Collection<AssertionInfo> issuedAis = aim.get(SP12Constants.ISSUED_TOKEN);

            for (AssertionWrapper assertionWrapper : findSamlTokenResults(rResult.getResults())) {
                boolean valid = issuedValidator.validatePolicy(issuedAis, assertionWrapper);
                if (valid) {
                    SecurityToken token = createSecurityToken(assertionWrapper);
                    getTokenStore(message).add(token);
                    message.getExchange().remove(SecurityConstants.TOKEN);
                    message.getExchange().put(SecurityConstants.TOKEN_ID, token.getId());
                    return;
                }
            }
            for (BinarySecurity binarySecurityToken : findBinarySecurityTokenResults(rResult.getResults())) {
                boolean valid = issuedValidator.validatePolicy(issuedAis, binarySecurityToken);
                if (valid) {
                    SecurityToken token = createSecurityToken(binarySecurityToken);
                    getTokenStore(message).add(token);
                    message.getExchange().remove(SecurityConstants.TOKEN);
                    message.getExchange().put(SecurityConstants.TOKEN_ID, token.getId());
View Full Code Here

Examples of org.apache.cxf.ws.security.wss4j.policyvalidators.IssuedTokenPolicyValidator

            AssertionInfoMap aim
        ) {
            List<WSSecurityEngineResult> signedResults =
                WSS4JUtils.fetchAllActionResults(rResult.getResults(), WSConstants.SIGN);
           
            IssuedTokenPolicyValidator issuedValidator =
                new IssuedTokenPolicyValidator(signedResults, message);
            Collection<AssertionInfo> issuedAis = aim.get(SP12Constants.ISSUED_TOKEN);

            for (AssertionWrapper assertionWrapper : findSamlTokenResults(rResult.getResults())) {
                boolean valid = issuedValidator.validatePolicy(issuedAis, assertionWrapper);
                if (valid) {
                    SecurityToken token = createSecurityToken(assertionWrapper);
                    getTokenStore(message).add(token);
                    message.getExchange().remove(SecurityConstants.TOKEN);
                    message.getExchange().put(SecurityConstants.TOKEN_ID, token.getId());
                    return;
                }
            }
            for (BinarySecurity binarySecurityToken : findBinarySecurityTokenResults(rResult.getResults())) {
                boolean valid = issuedValidator.validatePolicy(issuedAis, binarySecurityToken);
                if (valid) {
                    SecurityToken token = createSecurityToken(binarySecurityToken);
                    getTokenStore(message).add(token);
                    message.getExchange().remove(SecurityConstants.TOKEN);
                    message.getExchange().put(SecurityConstants.TOKEN_ID, token.getId());
View Full Code Here

Examples of org.apache.cxf.ws.security.wss4j.policyvalidators.IssuedTokenPolicyValidator

            Collection<AssertionInfo> issuedAis
        ) {
            List<WSSecurityEngineResult> signedResults =
                WSSecurityUtil.fetchAllActionResults(rResult.getResults(), WSConstants.SIGN);
           
            IssuedTokenPolicyValidator issuedValidator =
                new IssuedTokenPolicyValidator(signedResults, message);

            for (SamlAssertionWrapper assertionWrapper : findSamlTokenResults(rResult.getResults())) {
                boolean valid = issuedValidator.validatePolicy(issuedAis, assertionWrapper);
                if (valid) {
                    SecurityToken token = createSecurityToken(assertionWrapper);
                    message.getExchange().put(SecurityConstants.TOKEN, token);
                    return;
                }
            }
            for (BinarySecurity binarySecurityToken : findBinarySecurityTokenResults(rResult.getResults())) {
                boolean valid = issuedValidator.validatePolicy(issuedAis, binarySecurityToken);
                if (valid) {
                    SecurityToken token = createSecurityToken(binarySecurityToken);
                    message.getExchange().put(SecurityConstants.TOKEN, token);
                    return;
                }
View Full Code Here

Examples of org.apache.cxf.ws.security.wss4j.policyvalidators.IssuedTokenPolicyValidator

            AssertionInfoMap aim
        ) {
            List<WSSecurityEngineResult> signedResults =
                WSSecurityUtil.fetchAllActionResults(rResult.getResults(), WSConstants.SIGN);
           
            IssuedTokenPolicyValidator issuedValidator =
                new IssuedTokenPolicyValidator(signedResults, message);
            Collection<AssertionInfo> issuedAis =
                NegotiationUtils.getAllAssertionsByLocalname(aim, SPConstants.ISSUED_TOKEN);

            for (SamlAssertionWrapper assertionWrapper : findSamlTokenResults(rResult.getResults())) {
                boolean valid = issuedValidator.validatePolicy(issuedAis, assertionWrapper);
                if (valid) {
                    SecurityToken token = createSecurityToken(assertionWrapper);
                    WSS4JUtils.getTokenStore(message).add(token);
                    message.getExchange().remove(SecurityConstants.TOKEN);
                    message.getExchange().put(SecurityConstants.TOKEN_ID, token.getId());
                    return;
                }
            }
            for (BinarySecurity binarySecurityToken : findBinarySecurityTokenResults(rResult.getResults())) {
                boolean valid = issuedValidator.validatePolicy(issuedAis, binarySecurityToken);
                if (valid) {
                    SecurityToken token = createSecurityToken(binarySecurityToken);
                    WSS4JUtils.getTokenStore(message).add(token);
                    message.getExchange().remove(SecurityConstants.TOKEN);
                    message.getExchange().put(SecurityConstants.TOKEN_ID, token.getId());
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.