Author: anil.saldhana(a)jboss.com
Date: 2011-03-09 13:57:35 -0500 (Wed, 09 Mar 2011)
New Revision: 805
Modified:
federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/bindings/tomcat/sp/SPPostFormAuthenticator.java
federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/bindings/tomcat/sp/SPRedirectFormAuthenticator.java
Log:
adapt to JBAS5.1 and 6 quirkiness with Catalina Request
Modified:
federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/bindings/tomcat/sp/SPPostFormAuthenticator.java
===================================================================
---
federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/bindings/tomcat/sp/SPPostFormAuthenticator.java 2011-03-09
18:56:11 UTC (rev 804)
+++
federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/bindings/tomcat/sp/SPPostFormAuthenticator.java 2011-03-09
18:57:35 UTC (rev 805)
@@ -249,7 +249,18 @@
if (dispatch == null)
log.error("Cannot dispatch to the logout page: no request
dispatcher:" + this.logOutPage);
else
- dispatch.forward(request, response);
+ {
+ session.expire();
+ try
+ {
+ dispatch.forward(request, response);
+ }
+ catch (Exception e)
+ {
+ //JBAS5.1 and 6 quirkiness
+ dispatch.forward(request.getRequest(), response);
+ }
+ }
return false;
}
@@ -292,8 +303,7 @@
}
catch (Exception e)
{
- if (trace)
- log.trace("Server Exception:", e);
+ log.error("Server Exception:", e);
throw new IOException("Server Exception");
}
}
@@ -320,6 +330,7 @@
}
}//end if
+ log.error("Did not find any SAML Request/Response. Falling back on local Form
Authentication if available");
//fallback
return super.authenticate(request, response, loginConfig);
}
Modified:
federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/bindings/tomcat/sp/SPRedirectFormAuthenticator.java
===================================================================
---
federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/bindings/tomcat/sp/SPRedirectFormAuthenticator.java 2011-03-09
18:56:11 UTC (rev 804)
+++
federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/bindings/tomcat/sp/SPRedirectFormAuthenticator.java 2011-03-09
18:57:35 UTC (rev 805)
@@ -285,7 +285,18 @@
if (dispatch == null)
log.error("Cannot dispatch to the logout page: no request
dispatcher:" + this.logOutPage);
else
- dispatch.forward(request, response);
+ {
+ session.expire();
+ try
+ {
+ dispatch.forward(request, response);
+ }
+ catch (Exception e)
+ {
+ //JBAS5.1 and 6 quirkiness
+ dispatch.forward(request.getRequest(), response);
+ }
+ }
return false;
}
@@ -349,13 +360,13 @@
}
catch (Exception e)
{
- if (trace)
- log.trace("Server Exception:", e);
+ log.error("Server Exception:", e);
throw new IOException("Server Exception");
}
}//end if
+ log.error("Did not find any SAML Request/Response. Falling back on local Form
Authentication if available");
//fallback
return super.authenticate(request, response, loginConfig);
}