Examples of processSecurityHeader()


Examples of org.apache.ws.security.WSSecurityEngine.processSecurityHeader()

            LOG.debug(outputString);
        }
       
        WSSecurityEngine newEngine = new WSSecurityEngine();
        try {
            newEngine.processSecurityHeader(doc, null, callbackHandler, null);
            fail("Expected failure as it is not BSP compliant");
        } catch (WSSecurityException ex) {
            // expected
        }
        WSSConfig config = WSSConfig.getNewInstance();
View Full Code Here

Examples of org.apache.ws.security.WSSecurityEngine.processSecurityHeader()

            // expected
        }
        WSSConfig config = WSSConfig.getNewInstance();
        config.setWsiBSPCompliant(false);
        newEngine.setWssConfig(config);
        newEngine.processSecurityHeader(doc, null, callbackHandler, null);
    }
   
    /**
     * A test for sending multiple passwords in the UsernameToken
     */
 
View Full Code Here

Examples of org.apache.ws.security.WSSecurityEngine.processSecurityHeader()

            LOG.debug(outputString);
        }
       
        WSSecurityEngine newEngine = new WSSecurityEngine();
        try {
            newEngine.processSecurityHeader(doc, null, callbackHandler, null);
            fail("Expected failure as it is not BSP compliant");
        } catch (WSSecurityException ex) {
            // expected
        }
        WSSConfig config = WSSConfig.getNewInstance();
View Full Code Here

Examples of org.apache.ws.security.WSSecurityEngine.processSecurityHeader()

            // expected
        }
        WSSConfig config = WSSConfig.getNewInstance();
        config.setWsiBSPCompliant(false);
        newEngine.setWssConfig(config);
        newEngine.processSecurityHeader(doc, null, callbackHandler, null);
    }
   
    /**
     * A test for sending a nonce with a bad encoding type in the UsernameToken
     */
 
View Full Code Here

Examples of org.apache.ws.security.WSSecurityEngine.processSecurityHeader()

            LOG.debug(outputString);
        }
       
        WSSecurityEngine newEngine = new WSSecurityEngine();
        try {
            newEngine.processSecurityHeader(doc, null, callbackHandler, null);
            fail("Expected failure as it is not BSP compliant");
        } catch (WSSecurityException ex) {
            // expected
        }
        WSSConfig config = WSSConfig.getNewInstance();
View Full Code Here

Examples of org.apache.ws.security.WSSecurityEngine.processSecurityHeader()

            // expected
        }
        WSSConfig config = WSSConfig.getNewInstance();
        config.setWsiBSPCompliant(false);
        newEngine.setWssConfig(config);
        newEngine.processSecurityHeader(doc, null, callbackHandler, null);
    }
   
    /**
     * This is a test to create a "Spoofed" UsernameToken (see WSS-441)
     */
 
View Full Code Here

Examples of org.apache.ws.security.WSSecurityEngine.processSecurityHeader()

            LOG.debug(outputString);
        }
       
        try {
            WSSecurityEngine secEngine = new WSSecurityEngine();
            secEngine.processSecurityHeader(doc, null, callbackHandler, null);
            fail("The UsernameToken validation should have failed");
        } catch (WSSecurityException ex) {
            assertTrue(ex.getErrorCode() == WSSecurityException.MESSAGE_EXPIRED);
       
    }
View Full Code Here

Examples of org.apache.ws.security.WSSecurityEngine.processSecurityHeader()

    private List<WSSecurityEngineResult> verify(Document doc, boolean allowUsernameTokenDerivedKeys) throws Exception {
        WSSecurityEngine secEngine = new WSSecurityEngine();
        WSSConfig config = WSSConfig.getNewInstance();
        config.setAllowUsernameTokenNoPassword(allowUsernameTokenDerivedKeys);
        secEngine.setWssConfig(config);
        return secEngine.processSecurityHeader(doc, null, callbackHandler, null);
    }
   
    /**
     * A CallbackHandler for some (mostly insecure) scenarios.
     */
 
View Full Code Here

Examples of org.apache.ws.security.WSSecurityEngine.processSecurityHeader()

     * @throws Exception Thrown when there is a problem in verification
     */
    private List<WSSecurityEngineResult> verify(Document doc) throws Exception {
        WSSecurityEngine secEngine = new WSSecurityEngine();
        List<WSSecurityEngineResult> results =
            secEngine.processSecurityHeader(
                doc, null, null, crypto
            );
        String outputString =
            org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(doc);
        assertTrue(outputString.indexOf("counter_port_type") > 0 ? true : false);
View Full Code Here

Examples of org.apache.ws.security.WSSecurityEngine.processSecurityHeader()

        WSSConfig config = secEngine.getWssConfig();
        config.setValidator(WSSecurityEngine.SAML_TOKEN, validator);
        config.setValidator(WSSecurityEngine.SAML2_TOKEN, validator);
       
        List<WSSecurityEngineResult> results =
            secEngine.processSecurityHeader(
                doc, null, null, crypto
            );
        String outputString =
            org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(doc);
        assertTrue(outputString.indexOf("counter_port_type") > 0 ? true : false);
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.