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

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


        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);
View Full Code Here

TOP

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

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.