tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Gallew <geekat...@gmail.com>
Subject Minor patch for org.apache.catalina.realm.MemoryRealm
Date Thu, 04 Nov 2004 19:55:36 GMT
I would like to propose the following (trivial) patch to MemoryRealm.java:

diff -u -r1.7 MemoryRealm.java
--- catalina/src/share/org/apache/catalina/realm/MemoryRealm.java     
 24 Sep 2004 07:25:07 -0000      1.7
+++ catalina/src/share/org/apache/catalina/realm/MemoryRealm.java     
 4 Nov 2004 19:53:01 -0000
@@ -244,6 +244,16 @@
 
 
     /**
+     * Return a short name for this Realm implementation.
+     */
+    protected HashMap getPrincipals() {
+
+        return (principals);
+
+    }
+
+
+    /**
      * Return the password associated with the given principal's user name.
      */
     protected String getPassword(String username) {

The point of this is that, to extend MemoryRealm in any useful way you
need to be able to access principals.  Alternatively simply switching
principals from private to protected would be sufficient, but use an
accessor seems to be preferred.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message