Author: anil.saldhana(a)jboss.com
Date: 2010-09-17 12:25:11 -0400 (Fri, 17 Sep 2010)
New Revision: 400
Modified:
federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/bindings/tomcat/sp/BaseFormAuthenticator.java
Log:
PLFED-89: additional Tomcat AuthenticatorBase signature change
Modified:
federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/bindings/tomcat/sp/BaseFormAuthenticator.java
===================================================================
---
federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/bindings/tomcat/sp/BaseFormAuthenticator.java 2010-09-17
16:24:50 UTC (rev 399)
+++
federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/bindings/tomcat/sp/BaseFormAuthenticator.java 2010-09-17
16:25:11 UTC (rev 400)
@@ -31,11 +31,14 @@
import java.util.concurrent.locks.ReentrantLock;
import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletResponse;
import javax.xml.crypto.dsig.CanonicalizationMethod;
import org.apache.catalina.LifecycleException;
import org.apache.catalina.authenticator.FormAuthenticator;
import org.apache.catalina.connector.Request;
+import org.apache.catalina.connector.Response;
+import org.apache.catalina.deploy.LoginConfig;
import org.apache.log4j.Logger;
import org.picketlink.identity.federation.core.config.SPType;
import org.picketlink.identity.federation.core.exceptions.ConfigurationException;
@@ -117,6 +120,25 @@
return request.getParameter("SAMLResponse") != null;
}
+ /**
+ * Authenticate the request
+ * @param request
+ * @param response
+ * @param config
+ * @return
+ * @throws IOException
+ * @throws {@link RuntimeException} when the response is not of type catalina response
object
+ */
+ public boolean authenticate( Request request, HttpServletResponse response,
LoginConfig config) throws IOException
+ {
+ if( response instanceof Response )
+ {
+ Response catalinaResponse = (Response) response;
+ return authenticate(request, catalinaResponse, config);
+ }
+ throw new RuntimeException( "Response was not of type catalina response"
);
+ }
+
@Override
public void start() throws LifecycleException
{
Show replies by date