geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r164407 - /geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/UsernamePasswordCallback.java
Date Sat, 23 Apr 2005 18:39:28 GMT
Author: adc
Date: Sat Apr 23 11:39:27 2005
New Revision: 164407

URL: http://svn.apache.org/viewcvs?rev=164407&view=rev
Log:
People should be explicitly passing in a char array.

Modified:
    geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/UsernamePasswordCallback.java

Modified: geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/UsernamePasswordCallback.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/UsernamePasswordCallback.java?rev=164407&r1=164406&r2=164407&view=diff
==============================================================================
--- geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/UsernamePasswordCallback.java
(original)
+++ geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/UsernamePasswordCallback.java
Sat Apr 23 11:39:27 2005
@@ -31,9 +31,9 @@
  */
 public class UsernamePasswordCallback implements CallbackHandler {
     private final String username;
-    private final String password;
+    private final char[] password;
 
-    public UsernamePasswordCallback(String username, String password) {
+    public UsernamePasswordCallback(String username, char[] password) {
         this.username = username;
         this.password = password;
     }
@@ -41,7 +41,7 @@
     public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException
{
         for (int i = 0; i < callbacks.length; i++) {
             if (callbacks[i] instanceof PasswordCallback) {
-                ((PasswordCallback) callbacks[i]).setPassword(password.toCharArray());
+                ((PasswordCallback) callbacks[i]).setPassword(password);
             } else if (callbacks[i] instanceof NameCallback) {
                 ((NameCallback) callbacks[i]).setName(username);
             }



Mime
View raw message