You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jspwiki.apache.org by aj...@apache.org on 2009/05/06 05:08:20 UTC
svn commit: r772037 -
/incubator/jspwiki/trunk/src/java/org/apache/wiki/auth/AuthenticationManager.java
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)