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)