Package org.apache.wss4j.stax.ext

Examples of org.apache.wss4j.stax.ext.WSSSecurityProperties.addAction()


            WSSSecurityProperties properties = getProperties();
            WSSConstants.Action actionToPerform = WSSConstants.ENCRYPT;
            if (recToken.getToken().getDerivedKeys() == DerivedKeys.RequireDerivedKeys) {
                actionToPerform = WSSConstants.ENCRYPT_WITH_DERIVED_KEY;
            }
            properties.addAction(actionToPerform);
           
            for (SecurePart encPart : encrParts) {
                properties.addEncryptionPart(encPart);
            }
           
View Full Code Here


                || encryptionToken instanceof SpnegoContextToken) {
                tok = getSecurityToken();
                if (tok != null && isRequestor()) {
                    WSSSecurityProperties properties = getProperties();
                    WSSConstants.Action actionToPerform = WSSConstants.CUSTOM_TOKEN;
                    properties.addAction(actionToPerform);
                    customTokenAdded = true;
                } else if (tok == null && !isRequestor()) {
                    org.apache.xml.security.stax.securityToken.SecurityToken securityToken =
                        findInboundSecurityToken(WSSecurityEventConstants.SecurityContextToken);
                    tokenId = WSS4JUtils.parseAndStoreStreamingSecurityToken(securityToken, message);
View Full Code Here

                    || sigToken instanceof SpnegoContextToken) {
                    sigTok = getSecurityToken();
                    if (sigTok != null && isRequestor()) {
                        WSSSecurityProperties properties = getProperties();
                        WSSConstants.Action actionToPerform = WSSConstants.CUSTOM_TOKEN;
                        properties.addAction(actionToPerform);
                        customTokenAdded = true;
                    } else if (sigTok == null && !isRequestor()) {
                        org.apache.xml.security.stax.securityToken.SecurityToken securityToken =
                            findInboundSecurityToken(WSSecurityEventConstants.SecurityContextToken);
                        sigTokId = WSS4JUtils.parseAndStoreStreamingSecurityToken(securityToken, message);
View Full Code Here

           
            for (SecurePart encPart : encrParts) {
                properties.addEncryptionPart(encPart);
            }
           
            properties.addAction(actionToPerform);

            if (isRequestor()) {
                properties.setEncryptionKeyIdentifier(getKeyIdentifierType(recToken, encrToken));
                properties.setDerivedKeyKeyIdentifier(
                    WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference);
View Full Code Here

                CryptoFactory.getProperties("etc/Client_Encrypt.properties", StaxClient.class.getClassLoader());
            Properties sigCryptoProperties =
                CryptoFactory.getProperties("etc/Client_Sign.properties", StaxClient.class.getClassLoader());
           
            WSSSecurityProperties properties = new WSSSecurityProperties();
            properties.addAction(WSSConstants.USERNAMETOKEN);
            properties.addAction(WSSConstants.TIMESTAMP);
            properties.addAction(WSSConstants.SIGNATURE);
            properties.addAction(WSSConstants.ENCRYPT);

            properties.setUsernameTokenPasswordType(WSSConstants.UsernameTokenPasswordType.PASSWORD_DIGEST);
View Full Code Here

            Properties sigCryptoProperties =
                CryptoFactory.getProperties("etc/Client_Sign.properties", StaxClient.class.getClassLoader());
           
            WSSSecurityProperties properties = new WSSSecurityProperties();
            properties.addAction(WSSConstants.USERNAMETOKEN);
            properties.addAction(WSSConstants.TIMESTAMP);
            properties.addAction(WSSConstants.SIGNATURE);
            properties.addAction(WSSConstants.ENCRYPT);

            properties.setUsernameTokenPasswordType(WSSConstants.UsernameTokenPasswordType.PASSWORD_DIGEST);
            properties.setTokenUser("abcd");
View Full Code Here

                CryptoFactory.getProperties("etc/Client_Sign.properties", StaxClient.class.getClassLoader());
           
            WSSSecurityProperties properties = new WSSSecurityProperties();
            properties.addAction(WSSConstants.USERNAMETOKEN);
            properties.addAction(WSSConstants.TIMESTAMP);
            properties.addAction(WSSConstants.SIGNATURE);
            properties.addAction(WSSConstants.ENCRYPT);

            properties.setUsernameTokenPasswordType(WSSConstants.UsernameTokenPasswordType.PASSWORD_DIGEST);
            properties.setTokenUser("abcd");
            properties.setSignatureUser("clientx509v1");
View Full Code Here

           
            WSSSecurityProperties properties = new WSSSecurityProperties();
            properties.addAction(WSSConstants.USERNAMETOKEN);
            properties.addAction(WSSConstants.TIMESTAMP);
            properties.addAction(WSSConstants.SIGNATURE);
            properties.addAction(WSSConstants.ENCRYPT);

            properties.setUsernameTokenPasswordType(WSSConstants.UsernameTokenPasswordType.PASSWORD_DIGEST);
            properties.setTokenUser("abcd");
            properties.setSignatureUser("clientx509v1");
            properties.setEncryptionUser("serverx509v1");
View Full Code Here

            CryptoFactory.getProperties("etc/Server_Decrypt.properties", StaxServer.class.getClassLoader());
        Properties sigVerCryptoProperties =
            CryptoFactory.getProperties("etc/Server_SignVerf.properties", StaxServer.class.getClassLoader());
       
        WSSSecurityProperties properties = new WSSSecurityProperties();
        properties.addAction(WSSConstants.USERNAMETOKEN);
        properties.addAction(WSSConstants.TIMESTAMP);
        properties.addAction(WSSConstants.SIGNATURE);
        properties.addAction(WSSConstants.ENCRYPT);

        properties.setUsernameTokenPasswordType(WSSConstants.UsernameTokenPasswordType.PASSWORD_TEXT);
View Full Code Here

        Properties sigVerCryptoProperties =
            CryptoFactory.getProperties("etc/Server_SignVerf.properties", StaxServer.class.getClassLoader());
       
        WSSSecurityProperties properties = new WSSSecurityProperties();
        properties.addAction(WSSConstants.USERNAMETOKEN);
        properties.addAction(WSSConstants.TIMESTAMP);
        properties.addAction(WSSConstants.SIGNATURE);
        properties.addAction(WSSConstants.ENCRYPT);

        properties.setUsernameTokenPasswordType(WSSConstants.UsernameTokenPasswordType.PASSWORD_TEXT);
        properties.setTokenUser("Alice");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.