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

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


            //sct.setPolicyToken((Token)tokenAssertion);
            sct.setUUID(((Token)tokenAssertion).getTokenId());

        } else if (PolicyUtil.isKerberosToken(tokenAssertion, spVersion)) {
            AuthenticationTokenPolicy.KerberosTokenBinding kerbBinding =new AuthenticationTokenPolicy.KerberosTokenBinding();
            KerberosToken kerbToken = (KerberosToken)tokenAssertion;
            kerbBinding.setUUID(token.getTokenId());
            setTokenInclusion(kerbBinding,(Token) tokenAssertion);
            setTokenValueType(kerbBinding, tokenAssertion);
            kerbBinding.isOptional(tokenAssertion.isOptional());

            if(kerbToken.getIssuer() != null){
                Address addr = kerbToken.getIssuer().getAddress();
                if(addr != null)
                    kerbBinding.setIssuer(addr.getURI().toString());
            } else if(kerbToken.getIssuerName() != null){
                kerbBinding.setIssuer(kerbToken.getIssuerName().getIssuerName());
            }

            if(kerbToken.getClaims() != null){
                kerbBinding.setClaims(kerbToken.getClaims().getClaimsAsBytes());
            }


            //x509CB.setPolicyToken(token);
            if(!ignoreDK && kerbToken.isRequireDerivedKeys()){
                DerivedTokenKeyBinding dtKB =  new DerivedTokenKeyBinding();
                dtKB.setOriginalKeyBinding(kerbBinding);
                policy.setKeyBinding(dtKB);
                dtKB.setUUID(pid.generateID());
View Full Code Here


            }
        } else if(PolicyUtil.isKerberosToken(tokenAssertion, spVersion)){
            AuthenticationTokenPolicy.KerberosTokenBinding kerberosBinding =
                    new AuthenticationTokenPolicy.KerberosTokenBinding();
            kerberosBinding.setUUID(token.getTokenId());
            KerberosToken kerberosToken = (KerberosToken)tokenAssertion;
            tokenProcessor.setTokenValueType(kerberosBinding, tokenAssertion);
            tokenProcessor.setTokenInclusion(kerberosBinding,(Token) tokenAssertion);
            tokenProcessor.setKerberosTokenRefType(kerberosBinding, kerberosToken);
           
            if(kerberosToken.getIssuer() != null){
                Address addr = kerberosToken.getIssuer().getAddress();
                if(addr != null)
                    kerberosBinding.setIssuer(addr.getURI().toString());
            } else if(kerberosToken.getIssuerName() != null){
                kerberosBinding.setIssuer(kerberosToken.getIssuerName().getIssuerName());
            }
           
            if(kerberosToken.getClaims() != null){
                kerberosBinding.setClaims(kerberosToken.getClaims().getClaimsAsBytes());
            }
           
            if(kerberosToken.isRequireDerivedKeys()){
                DerivedTokenKeyBinding dtKB =  new DerivedTokenKeyBinding();
                skb.setKeyBinding(kerberosBinding);
                policy.setKeyBinding(dtKB);
                dtKB.setOriginalKeyBinding(skb);
                dtKB.setUUID(pid.generateID());
View Full Code Here

TOP

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

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.