Package com.sun.xml.ws.security.policy

Examples of com.sun.xml.ws.security.policy.AsymmetricBinding


    protected ArrayList<PolicyAssertion> getTokens(Policy policy){
        ArrayList<PolicyAssertion> tokenList = new ArrayList<PolicyAssertion>();
        for(AssertionSet assertionSet : policy){
            for(PolicyAssertion assertion:assertionSet){
                if(PolicyUtil.isAsymmetricBinding(assertion, spVersion)){
                    AsymmetricBinding sb =  (AsymmetricBinding)assertion;
                    Token iToken = sb.getInitiatorToken();
                        if (iToken != null){
                            addToken(iToken, tokenList);
                        }else{
                            addToken(sb.getInitiatorSignatureToken(), tokenList);
                            addToken(sb.getInitiatorEncryptionToken(), tokenList);
                        }

                        Token rToken = sb.getRecipientToken();
                        if (rToken != null){
                            addToken(rToken, tokenList);
                        }else{
                            addToken(sb.getRecipientSignatureToken(), tokenList);
                            addToken(sb.getRecipientEncryptionToken(), tokenList);
                        }
                }else if(PolicyUtil.isSymmetricBinding(assertion, spVersion)){
                    SymmetricBinding sb = (SymmetricBinding)assertion;
                    Token token = sb.getProtectionToken();
                    if(token != null){
                        addToken(token,tokenList);
                    }else{
                        addToken(sb.getEncryptionToken(),tokenList);
                        addToken(sb.getSignatureToken(),tokenList);
                    }
                }else if(PolicyUtil.isSupportingTokens(assertion, spVersion)){
                    SupportingTokens st = (SupportingTokens)assertion;
                    Iterator itr = st.getTokens();
                    while(itr.hasNext()){
View Full Code Here


            if(PolicyUtil.isBootstrapPolicy(pa, spVersion)){
                NestedPolicy np = pa.getNestedPolicy();
                AssertionSet bpSet = np.getAssertionSet();
                for(PolicyAssertion assertion:bpSet){
                    if(PolicyUtil.isAsymmetricBinding(assertion, spVersion)){
                        AsymmetricBinding sb =  (AsymmetricBinding)assertion;
                         Token iToken = sb.getInitiatorToken();
                        if (iToken != null){
                            addToken(iToken);
                        }else{
                            addToken(sb.getInitiatorSignatureToken());
                            addToken(sb.getInitiatorEncryptionToken());
                        }

                        Token rToken = sb.getRecipientToken();
                        if (rToken != null){
                            addToken(rToken);
                        }else{
                            addToken(sb.getRecipientSignatureToken());
                            addToken(sb.getRecipientEncryptionToken());
                        }
                    }else if(PolicyUtil.isSymmetricBinding(assertion, spVersion)){
                        SymmetricBinding sb = (SymmetricBinding)assertion;
                        Token token = sb.getProtectionToken();
                        if(token != null){
                            addToken(token);
                        }else{
                            addToken(sb.getEncryptionToken());
                            addToken(sb.getSignatureToken());
                        }
                    }else if(PolicyUtil.isSupportingTokens(assertion, spVersion)){
                        SupportingTokens st = (SupportingTokens)assertion;
                        Iterator itr = st.getTokens();
                        while(itr.hasNext()){
View Full Code Here

    protected ArrayList<PolicyAssertion> getTokens(Policy policy) {
        ArrayList<PolicyAssertion> tokenList = new ArrayList<PolicyAssertion>();
        for (AssertionSet assertionSet : policy) {
            for (PolicyAssertion assertion : assertionSet) {
                if (PolicyUtil.isAsymmetricBinding(assertion, spVersion)) {
                    AsymmetricBinding sb = (AsymmetricBinding) assertion;
                    Token iToken = sb.getInitiatorToken();
                    if (iToken != null) {
                        addToken(iToken, tokenList);
                    } else {
                        addToken(sb.getInitiatorSignatureToken(), tokenList);
                        addToken(sb.getInitiatorEncryptionToken(), tokenList);
                    }

                    Token rToken = sb.getRecipientToken();
                    if (rToken != null) {
                        addToken(rToken, tokenList);
                    } else {
                        addToken(sb.getRecipientSignatureToken(), tokenList);
                        addToken(sb.getRecipientEncryptionToken(), tokenList);
                    }
                } else if (PolicyUtil.isSymmetricBinding(assertion, spVersion)) {
                    SymmetricBinding sb = (SymmetricBinding) assertion;
                    Token token = sb.getProtectionToken();
                    if (token != null) {
                        addToken(token, tokenList);
                    } else {
                        addToken(sb.getEncryptionToken(), tokenList);
                        addToken(sb.getSignatureToken(), tokenList);
                    }
                } else if (PolicyUtil.isSupportingTokens(assertion, spVersion)) {
                    SupportingTokens st = (SupportingTokens) assertion;
                    Iterator itr = st.getTokens();
                    while (itr.hasNext()) {
View Full Code Here

TOP

Related Classes of com.sun.xml.ws.security.policy.AsymmetricBinding

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.