geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r658740 - /geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/LoginHandler.java
Date Wed, 21 May 2008 16:13:44 GMT
Author: gnodet
Date: Wed May 21 09:13:43 2008
New Revision: 658740

URL: http://svn.apache.org/viewvc?rev=658740&view=rev
Log:
GSHELL-114: The LoginHandler default realm should be configurable

Modified:
    geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/LoginHandler.java

Modified: geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/LoginHandler.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/LoginHandler.java?rev=658740&r1=658739&r2=658740&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/LoginHandler.java
(original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/LoginHandler.java
Wed May 21 09:13:43 2008
@@ -47,6 +47,8 @@
     @Requirement
     private TimeoutManager timeoutManager;
 
+    private String defaultRealm = "BogusLogin";
+
     public LoginHandler() {
         super(LoginMessage.class);
     }
@@ -56,6 +58,11 @@
         this.timeoutManager = timeoutManager;
     }
 
+    public LoginHandler(final TimeoutManager timeoutManager, final String defaultRealm) {
+        this(timeoutManager);
+        this.defaultRealm = defaultRealm;
+    }
+
     public void initialize() throws InitializationException {
         new JaasConfigurationHelper("server.login.conf").initialize();
     }
@@ -68,7 +75,7 @@
         else {
             String realm = message.getRealm();
             if (realm == null) {
-                realm = "BogusLogin";
+                realm = defaultRealm;
             }
 
             String username = message.getUsername();



Mime
View raw message