Package org.apache.cxf.ws.security.wss4j.policyvalidators

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


            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

            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

                        );
                       
                        //
                        // Validate the Issued Token policy
                        //
                        IssuedTokenPolicyValidator issuedValidator =
                            new IssuedTokenPolicyValidator(signedResults, message);
                        if (!issuedValidator.validatePolicy(aim, wser)) {
                            break;
                        }
                       
                        SecurityToken token = createSecurityToken(wser);
                        message.getExchange().put(SecurityConstants.TOKEN, token);
View Full Code Here

            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

            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

TOP

Related Classes of org.apache.cxf.ws.security.wss4j.policyvalidators.IssuedTokenPolicyValidator

Copyright © 2018 www.massapicom. 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.