Author: coheigea
Date: Tue Nov  9 12:13:04 2010
New Revision: 1032952

URL: http://svn.apache.org/viewvc?rev=1032952&view=rev
Log:
[WSS-239] - Cleaning up callback handler implementation in test.

Modified:
    webservices/wss4j/branches/1_5_x-fixes/test/wssec/TestWSSecurityNew5.java

Modified: 
webservices/wss4j/branches/1_5_x-fixes/test/wssec/TestWSSecurityNew5.java
URL: 
http://svn.apache.org/viewvc/webservices/wss4j/branches/1_5_x-fixes/test/wssec/TestWSSecurityNew5.java?rev=1032952&r1=1032951&r2=1032952&view=diff
==============================================================================
--- webservices/wss4j/branches/1_5_x-fixes/test/wssec/TestWSSecurityNew5.java 
(original)
+++ webservices/wss4j/branches/1_5_x-fixes/test/wssec/TestWSSecurityNew5.java 
Tue Nov  9 12:13:04 2010
@@ -691,42 +691,21 @@ public class TestWSSecurityNew5 extends 
                     }
                 } else if (pc.getUsage() == WSPasswordCallback.USERNAME_TOKEN
                     && "emptyuser".equals(pc.getIdentifier())) {
-                    if (passwordsAreEncoded) {
-                        // "2jmj7l5rSw0yVb/vlWAYkK/YBwk=" is the Base64 
encoded SHA-1 hash of "".
-                        pc.setPassword("2jmj7l5rSw0yVb/vlWAYkK/YBwk=");
-                    } else {
-                        pc.setPassword("");
-                    }
+                    pc.setPassword("");
                 }  
                 else if (
                     pc.getUsage() == WSPasswordCallback.USERNAME_TOKEN_UNKNOWN
                 ) {
-                    if (passwordsAreEncoded) {
-                        if ("wernerd".equals(pc.getIdentifier())
-                            && 
"hGqoUreBgahTJblQ3DbJIkE6uNs=".equals(pc.getPassword())) {
-                            // "hGqoUreBgahTJblQ3DbJIkE6uNs=" is the Base64 
encoded SHA-1 hash of "verySecret".
-                            return;
-                        } else if ("customUser".equals(pc.getIdentifier())) {
-                            return;
-                        } else if ("wernerd".equals(pc.getIdentifier())
-                                && 
"2jmj7l5rSw0yVb/vlWAYkK/YBwk=".equals(pc.getPassword())) {
-                            // "2jmj7l5rSw0yVb/vlWAYkK/YBwk=" is the Base64 
encoded SHA-1 hash of "".
-                            return;
-                        } else {
-                            throw new IOException("Authentication failed");
-                        }
+                    if ("wernerd".equals(pc.getIdentifier())
+                        && "verySecret".equals(pc.getPassword())) {
+                        return;
+                    } else if ("customUser".equals(pc.getIdentifier())) {
+                        return;
+                    } else if ("wernerd".equals(pc.getIdentifier())
+                        && "".equals(pc.getPassword())) {
+                        return;
                     } else {
-                        if ("wernerd".equals(pc.getIdentifier())
-                            && "verySecret".equals(pc.getPassword())) {
-                            return;
-                        } else if ("customUser".equals(pc.getIdentifier())) {
-                            return;
-                        } else if ("wernerd".equals(pc.getIdentifier())
-                                && "".equals(pc.getPassword())) {
-                            return;
-                        } else {
-                            throw new IOException("Authentication failed");
-                        }
+                        throw new IOException("Authentication failed");
                     }
                 }
             } else {



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to