jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ajaqu...@apache.org
Subject svn commit: r772037 - /incubator/jspwiki/trunk/src/java/org/apache/wiki/auth/AuthenticationManager.java
Date Wed, 06 May 2009 03:08:20 GMT
Author: ajaquith
Date: Wed May  6 03:08:19 2009
New Revision: 772037

URL: http://svn.apache.org/viewvc?rev=772037&view=rev
Log:
Fixed bug in AuthenticationManager that was causing cookie authentication to fail.

Modified:
    incubator/jspwiki/trunk/src/java/org/apache/wiki/auth/AuthenticationManager.java

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/auth/AuthenticationManager.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/auth/AuthenticationManager.java?rev=772037&r1=772036&r2=772037&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/auth/AuthenticationManager.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/auth/AuthenticationManager.java Wed May
 6 03:08:19 2009
@@ -287,14 +287,22 @@
             try
             {
                 principals = authenticationMgr.doJAASLogin( WebContainerLoginModule.class,
handler, options );
-                if ( principals.size() == 0 && authenticationMgr.allowsCookieAuthentication()
)
+            }
+            catch( LoginException e )
+            {
+                // Failed to log in with container credentials
+            }
+
+            try
+            {
+                if ( ( principals == null || principals.size() == 0 ) && authenticationMgr.allowsCookieAuthentication()
)
                 {
                     principals = authenticationMgr.doJAASLogin( CookieAuthenticationLoginModule.class,
handler, options );
                 }
             }
             catch( LoginException e )
             {
-                // Failed to log in with container credentials
+                // Failed to log in with cookie authentication credentials
             }
             
             // If the container logged the user in successfully, tell the WikiSession (and
add all of the Principals)



Mime
View raw message