geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r615401 - /geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/NamedUsernamePasswordCredentialLoginModule.java
Date Fri, 25 Jan 2008 23:40:39 GMT
Author: djencks
Date: Fri Jan 25 15:40:39 2008
New Revision: 615401

URL: http://svn.apache.org/viewvc?rev=615401&view=rev
Log:
GERONIMO-3744 shorten option name in NamedUsernamePasswordCredentialLoginModule preserving
long name too

Modified:
    geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/NamedUsernamePasswordCredentialLoginModule.java

Modified: geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/NamedUsernamePasswordCredentialLoginModule.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/NamedUsernamePasswordCredentialLoginModule.java?rev=615401&r1=615400&r2=615401&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/NamedUsernamePasswordCredentialLoginModule.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/NamedUsernamePasswordCredentialLoginModule.java
Fri Jan 25 15:40:39 2008
@@ -53,8 +53,9 @@
 public class NamedUsernamePasswordCredentialLoginModule implements LoginModule {
     private static Log log = LogFactory.getLog(NamedUsernamePasswordCredentialLoginModule.class);
 
-    public static final String CREDENTIAL_NAME = "org.apache.geronimo.jaas.NamedUsernamePasswordCredential.Name";
-    public final static List<String> supportedOptions = Collections.unmodifiableList(Arrays.asList(CREDENTIAL_NAME));
+    public static final String CREDENTIAL_NAME = "Name";
+    public static final String CREDENTIAL_NAME_LONG = NamedUsernamePasswordCredentialLoginModule.class.getName()
+ "." + CREDENTIAL_NAME;
+    public final static List<String> supportedOptions = Collections.unmodifiableList(Arrays.asList(CREDENTIAL_NAME,
CREDENTIAL_NAME_LONG));
 
     private String name;
     private Subject subject;
@@ -70,7 +71,10 @@
                 log.warn("Ignoring option: "+option+". Not supported.");
             }
         }
-        this.name = (String) options.get(CREDENTIAL_NAME);
+        name = (String) options.get(CREDENTIAL_NAME);
+        if (name == null) {
+            name = (String) options.get(CREDENTIAL_NAME_LONG);
+        }
     }
 
     public boolean login() throws LoginException {



Mime
View raw message