Package org.apache.wss4j.common.kerberos

Examples of org.apache.wss4j.common.kerberos.KerberosTokenDecoder


            );
        }
        credential.setPrincipal(principal);
        credential.setSubject(subject);
       
        KerberosTokenDecoder kerberosTokenDecoder = this.kerberosTokenDecoder;
        if (kerberosTokenDecoder == null) {
            kerberosTokenDecoder = new KerberosTokenDecoderImpl();
        }

        kerberosTokenDecoder.clear();
        kerberosTokenDecoder.setToken(token);
        kerberosTokenDecoder.setSubject(subject);
        try {
            byte[] sessionKey = kerberosTokenDecoder.getSessionKey();
            credential.setSecretKey(sessionKey);
        } catch (KerberosTokenDecoderException e) {
            throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, e);
        }
View Full Code Here


        }
       
        // Otherwise, try to extract the session key from the token if a KerberosTokenDecoder implementation is
        // available
        if (null == credential.getSecretKey()) {   
            KerberosTokenDecoder kerberosTokenDecoder = this.kerberosTokenDecoder;
            if (kerberosTokenDecoder == null) {
                kerberosTokenDecoder = new KerberosTokenDecoderImpl();
            }
           
            LOG.debug("KerberosTokenDecoder is set.Trying to obtain the session key from it.");           
            kerberosTokenDecoder.clear();
            kerberosTokenDecoder.setToken(token);
            kerberosTokenDecoder.setSubject(subject);
            try {
                byte[] key = kerberosTokenDecoder.getSessionKey();
                if (null != key) {
                    LOG.debug("Session key obtained from the KerberosTokenDecoder.");
                    credential.setSecretKey(key);
                } else {
                    LOG.debug("Session key could not be obtained from the KerberosTokenDecoder.");
View Full Code Here

            );
        }
        credential.setPrincipal(principal);
        credential.setSubject(subject);
       
        KerberosTokenDecoder kerberosTokenDecoder = this.kerberosTokenDecoder;
        if (kerberosTokenDecoder == null) {
            kerberosTokenDecoder = new KerberosTokenDecoderImpl();
        }

        kerberosTokenDecoder.clear();
        kerberosTokenDecoder.setToken(token);
        kerberosTokenDecoder.setSubject(subject);
        try {
            byte[] sessionKey = kerberosTokenDecoder.getSessionKey();
            credential.setSecretKey(sessionKey);
        } catch (KerberosTokenDecoderException e) {
            throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, e);
        }
View Full Code Here

        }
       
        // Otherwise, try to extract the session key from the token if a KerberosTokenDecoder implementation is
        // available
        if (null == credential.getSecretKey()) {   
            KerberosTokenDecoder kerberosTokenDecoder = this.kerberosTokenDecoder;
            if (kerberosTokenDecoder == null) {
                kerberosTokenDecoder = new KerberosTokenDecoderImpl();
            }
           
            LOG.debug("KerberosTokenDecoder is set.Trying to obtain the session key from it.");           
            kerberosTokenDecoder.clear();
            kerberosTokenDecoder.setToken(token);
            kerberosTokenDecoder.setSubject(subject);
            try {
                byte[] key = kerberosTokenDecoder.getSessionKey();
                if (null != key) {
                    LOG.debug("Session key obtained from the KerberosTokenDecoder.");
                    credential.setSecretKey(key);
                } else {
                    LOG.debug("Session key could not be obtained from the KerberosTokenDecoder.");
View Full Code Here

        }
       
        // Otherwise, try to extract the session key from the token if a KerberosTokenDecoder implementation is
        // available
        if (null == credential.getSecretKey()) {   
            KerberosTokenDecoder kerberosTokenDecoder = this.kerberosTokenDecoder;
            if (kerberosTokenDecoder == null) {
                kerberosTokenDecoder = new KerberosTokenDecoderImpl();
            }
           
            LOG.debug("KerberosTokenDecoder is set.Trying to obtain the session key from it.");           
            kerberosTokenDecoder.clear();
            kerberosTokenDecoder.setToken(token);
            kerberosTokenDecoder.setSubject(subject);
            try {
                byte[] key = kerberosTokenDecoder.getSessionKey();
                if (null != key) {
                    LOG.debug("Session key obtained from the KerberosTokenDecoder.");
                    credential.setSecretKey(key);
                } else {
                    LOG.debug("Session key could not be obtained from the KerberosTokenDecoder.");
View Full Code Here

TOP

Related Classes of org.apache.wss4j.common.kerberos.KerberosTokenDecoder

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.