Package org.apache.ws.security.message.token

Examples of org.apache.ws.security.message.token.KerberosSecurity


    public SecurityToken requestSecurityToken() throws Exception {
        if (LOG.isLoggable(Level.FINE)) {
            LOG.fine("Requesting Kerberos ticket for " + serviceName
                    + " using JAAS Login Module: " + jaasLoginModuleName);
        }
        KerberosSecurity bst = new KerberosSecurity(DOMUtils.createDocument());
        bst.retrieveServiceTicket(jaasLoginModuleName, callbackHandler, serviceName);
        bst.addWSUNamespace();
        bst.setID(wssConfig.getIdAllocator().createSecureId("BST-", bst));
       
        SecurityToken token = new SecurityToken(bst.getID());
        token.setToken(bst.getElement());
        //token.setSecret(bst.getToken());
        token.setTokenType(bst.getValueType());

        return token;
    }
View Full Code Here


        if (X509Security.X509_V3_TYPE.equals(type)) {
            token = new X509Security(element, config.isWsiBSPCompliant());
        } else if (PKIPathSecurity.getType().equals(type)) {
            token = new PKIPathSecurity(element, config.isWsiBSPCompliant());
        } else if (KerberosSecurity.isKerberosToken(type)) {
            token = new KerberosSecurity(element, config.isWsiBSPCompliant());
        } else {
            token = new BinarySecurity(element, config.isWsiBSPCompliant());
        }
        return token;
    }
View Full Code Here

            Message message,
            AssertionInfoMap aim
        ) {
            List<WSSecurityEngineResult> kerberosResults = findKerberosResults(rResult.getResults());
            for (WSSecurityEngineResult wser : kerberosResults) {
                KerberosSecurity kerberosToken =
                    (KerberosSecurity)wser.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN);
                KerberosTokenPolicyValidator kerberosValidator =
                    new KerberosTokenPolicyValidator(message);
                boolean valid = kerberosValidator.validatePolicy(aim, kerberosToken);
                if (valid) {
View Full Code Here

    public SecurityToken requestSecurityToken() throws Exception {
        if (LOG.isLoggable(Level.FINE)) {
            LOG.fine("Requesting Kerberos ticket for " + serviceName
                    + " using JAAS Login Module: " + getContextName());
        }
        KerberosSecurity bst = new KerberosSecurity(DOMUtils.createDocument());
        bst.retrieveServiceTicket(getContextName(), callbackHandler, serviceName);
        bst.addWSUNamespace();
        bst.setID(wssConfig.getIdAllocator().createSecureId("BST-", bst));
       
        SecurityToken token = new SecurityToken(bst.getID());
        token.setToken(bst.getElement());
        token.setWsuId(bst.getID());
        SecretKey secretKey = bst.getSecretKey();
        if (secretKey != null) {
            token.setSecret(secretKey.getEncoded());
        }
        String sha1 = Base64.encode(WSSecurityUtil.generateDigest(bst.getToken()));
        token.setSHA1(sha1);
        token.setTokenType(bst.getValueType());

        return token;
    }
View Full Code Here

            Message message,
            AssertionInfoMap aim
        ) {
            List<WSSecurityEngineResult> kerberosResults = findKerberosResults(rResult.getResults());
            for (WSSecurityEngineResult wser : kerberosResults) {
                KerberosSecurity kerberosToken =
                    (KerberosSecurity)wser.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN);
                KerberosTokenPolicyValidator kerberosValidator =
                    new KerberosTokenPolicyValidator(message);
                boolean valid = kerberosValidator.validatePolicy(aim, kerberosToken);
                if (valid) {
View Full Code Here

            Message message,
            AssertionInfoMap aim
        ) {
            List<WSSecurityEngineResult> kerberosResults = findKerberosResults(rResult.getResults());
            for (WSSecurityEngineResult wser : kerberosResults) {
                KerberosSecurity kerberosToken =
                    (KerberosSecurity)wser.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN);
                KerberosTokenPolicyValidator kerberosValidator =
                    new KerberosTokenPolicyValidator(message);
                boolean valid = kerberosValidator.validatePolicy(aim, kerberosToken);
                if (valid) {
View Full Code Here

        if (X509Security.X509_V3_TYPE.equals(type)) {
            token = new X509Security(element, config.isWsiBSPCompliant());
        } else if (PKIPathSecurity.getType().equals(type)) {
            token = new PKIPathSecurity(element, config.isWsiBSPCompliant());
        } else if (KerberosSecurity.isKerberosToken(type)) {
            token = new KerberosSecurity(element, config.isWsiBSPCompliant());
        } else {
            token = new BinarySecurity(element, config.isWsiBSPCompliant());
        }
        return token;
    }
View Full Code Here

            Message message,
            AssertionInfoMap aim
        ) {
            List<WSSecurityEngineResult> kerberosResults = findKerberosResults(rResult.getResults());
            for (WSSecurityEngineResult wser : kerberosResults) {
                KerberosSecurity kerberosToken =
                    (KerberosSecurity)wser.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN);
                KerberosTokenPolicyValidator kerberosValidator =
                    new KerberosTokenPolicyValidator(message);
                boolean valid = kerberosValidator.validatePolicy(aim, kerberosToken);
                if (valid) {
View Full Code Here

        if (X509Security.X509_V3_TYPE.equals(type)) {
            token = new X509Security(element, config.isWsiBSPCompliant());
        } else if (PKIPathSecurity.getType().equals(type)) {
            token = new PKIPathSecurity(element, config.isWsiBSPCompliant());
        } else if (KerberosSecurity.isKerberosToken(type)) {
            token = new KerberosSecurity(element, config.isWsiBSPCompliant());
        } else {
            token = new BinarySecurity(element, config.isWsiBSPCompliant());
        }
        return token;
    }
View Full Code Here

        ) {
            if (results != null) {
                for (WSHandlerResult rResult : results) {
                    List<WSSecurityEngineResult> kerberosResults = findKerberosResults(rResult.getResults());
                    for (WSSecurityEngineResult wser : kerberosResults) {
                        KerberosSecurity kerberosToken =
                            (KerberosSecurity)wser.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN);
                        KerberosTokenPolicyValidator kerberosValidator =
                            new KerberosTokenPolicyValidator(message);
                        boolean valid = kerberosValidator.validatePolicy(aim, kerberosToken);
                        if (valid) {
View Full Code Here

TOP

Related Classes of org.apache.ws.security.message.token.KerberosSecurity

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.