Author: alain_defrance
Date: 2010-09-29 10:30:22 -0400 (Wed, 29 Sep 2010)
New Revision: 4435
Added:
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AuthenticationResult.java
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/GenericAuthenticationResult.java
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/ProgrammaticAuthenticationResult.java
Modified:
components/wci/branches/adf/exo/pom.xml
components/wci/branches/adf/jetty/src/main/java/org/gatein/wci/jetty/Jetty6ServletContainerContext.java
components/wci/branches/adf/pom.xml
components/wci/branches/adf/test/core/src/main/java/org/gatein/wci/container/ServletContainerContextImpl.java
components/wci/branches/adf/test/servers/jboss51/pom.xml
components/wci/branches/adf/test/servers/jboss51/src/integration-tests/build.xml
components/wci/branches/adf/tomcat6/pom.xml
components/wci/branches/adf/tomcat6/src/main/java/org/gatein/wci/tomcat/TC6ServletContainerContext.java
components/wci/branches/adf/tomcat7/pom.xml
components/wci/branches/adf/tomcat7/src/main/java/org/gatein/wci/tomcat/TC7ServletContainerContext.java
components/wci/branches/adf/wci/pom.xml
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/ServletContainer.java
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/Authentication.java
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/GenericAuthentication.java
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/impl/DefaultServletContainer.java
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/impl/generic/GenericServletContainerContext.java
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/spi/ServletContainerContext.java
Log:
login feature in progress
Modified: components/wci/branches/adf/exo/pom.xml
===================================================================
--- components/wci/branches/adf/exo/pom.xml 2010-09-29 13:42:11 UTC (rev 4434)
+++ components/wci/branches/adf/exo/pom.xml 2010-09-29 14:30:22 UTC (rev 4435)
@@ -14,6 +14,11 @@
<groupId>org.gatein.wci</groupId>
<artifactId>wci-wci</artifactId>
</dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
</project>
Modified:
components/wci/branches/adf/jetty/src/main/java/org/gatein/wci/jetty/Jetty6ServletContainerContext.java
===================================================================
---
components/wci/branches/adf/jetty/src/main/java/org/gatein/wci/jetty/Jetty6ServletContainerContext.java 2010-09-29
13:42:11 UTC (rev 4434)
+++
components/wci/branches/adf/jetty/src/main/java/org/gatein/wci/jetty/Jetty6ServletContainerContext.java 2010-09-29
14:30:22 UTC (rev 4435)
@@ -10,6 +10,8 @@
import javax.servlet.http.HttpServletResponse;
import org.gatein.wci.RequestDispatchCallback;
+import org.gatein.wci.authentication.AuthenticationResult;
+import org.gatein.wci.authentication.GenericAuthentication;
import org.gatein.wci.command.CommandDispatcher;
import org.gatein.wci.impl.DefaultServletContainerFactory;
import org.gatein.wci.spi.ServletContainerContext;
@@ -60,8 +62,12 @@
this.registration = null;
}
+ public AuthenticationResult login(HttpServletRequest request, HttpServletResponse
response, String userName, String password) {
+ return GenericAuthentication.getInstance().login(userName, password.toCharArray());
+ }
- public void start()
+
+ public void start()
{
DefaultServletContainerFactory.registerContext(this);
Modified: components/wci/branches/adf/pom.xml
===================================================================
--- components/wci/branches/adf/pom.xml 2010-09-29 13:42:11 UTC (rev 4434)
+++ components/wci/branches/adf/pom.xml 2010-09-29 14:30:22 UTC (rev 4435)
@@ -52,6 +52,16 @@
<groupId>org.gatein.common</groupId>
<artifactId>common-common</artifactId>
<version>${version.gatein.common}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.codehaus.cargo</groupId>
+ <artifactId>cargo-core-uberjar</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.gatein.common</groupId>
Modified:
components/wci/branches/adf/test/core/src/main/java/org/gatein/wci/container/ServletContainerContextImpl.java
===================================================================
---
components/wci/branches/adf/test/core/src/main/java/org/gatein/wci/container/ServletContainerContextImpl.java 2010-09-29
13:42:11 UTC (rev 4434)
+++
components/wci/branches/adf/test/core/src/main/java/org/gatein/wci/container/ServletContainerContextImpl.java 2010-09-29
14:30:22 UTC (rev 4435)
@@ -22,6 +22,8 @@
******************************************************************************/
package org.gatein.wci.container;
+import org.gatein.wci.authentication.AuthenticationResult;
+import org.gatein.wci.authentication.GenericAuthentication;
import org.gatein.wci.spi.ServletContainerContext;
import org.gatein.wci.RequestDispatchCallback;
@@ -59,4 +61,9 @@
{
this.registration = null;
}
+
+ public AuthenticationResult login(HttpServletRequest request, HttpServletResponse
response, String userName, String password)
+ {
+ return GenericAuthentication.getInstance().login(userName,
password.toCharArray());
+ }
}
Modified: components/wci/branches/adf/test/servers/jboss51/pom.xml
===================================================================
--- components/wci/branches/adf/test/servers/jboss51/pom.xml 2010-09-29 13:42:11 UTC (rev
4434)
+++ components/wci/branches/adf/test/servers/jboss51/pom.xml 2010-09-29 14:30:22 UTC (rev
4435)
@@ -287,7 +287,6 @@
<artifactId>jaxen</artifactId>
<version>1.1.1</version>
</dependency>
-
</dependencies>
<version>1.3</version>
<executions>
@@ -339,6 +338,10 @@
<property name="dependency.gatein-wci-exo.jar"
value="${maven.dependency.org.gatein.wci.wci-exo.jar.path}" />
<property name="dependency.jboss-serialization.jar"
value="${maven.dependency.jboss.jboss-serialization.jar.path}" />
+ <property name="dependency.cargo-jboss-deployer.jar"
value="${maven.dependency.org.codehaus.cargo.cargo-core-tools-jboss-deployer-5.1-and-onwards.jar.path}"
/>
+ <property name="dependency.jboss-profile-service.jar"
value="${maven.dependency.org.jboss.integration.jboss-profileservice-spi.jar.path}"
/>
+ <property name="dependency.cargo-core-container-jboss.jar"
value="${maven.dependency.org.codehaus.cargo.cargo-core-container-jboss.jar.path}"
/>
+
<!-- locations of archives to use -->
<property name="test.archives.directory"
value="${project.build.directory}/test-archives" />
<property name="test.generic.server.war"
value="${test.archives.directory}/test-spi-generic-server.war" />
Modified:
components/wci/branches/adf/test/servers/jboss51/src/integration-tests/build.xml
===================================================================
---
components/wci/branches/adf/test/servers/jboss51/src/integration-tests/build.xml 2010-09-29
13:42:11 UTC (rev 4434)
+++
components/wci/branches/adf/test/servers/jboss51/src/integration-tests/build.xml 2010-09-29
14:30:22 UTC (rev 4435)
@@ -25,6 +25,11 @@
<path path="${dependency.gatein-wci-core.jar}"/>
<path path="${dependency.gatein-wci-tomcat.jar}"/>
<path path="${dependency.gatein-wci-exo.jar}"/>
+
+ <!-- paths needed for remote jboss deployment -->
+ <path path="${dependency.cargo-jboss-deployer.jar}"/>
+ <path path="${dependency.jboss-profile-service.jar}"/>
+ <path path="${dependency.cargo-core-container-jboss.jar}"/>
</path>
<target name="cargo.start" depends="cargo.setup">
Modified: components/wci/branches/adf/tomcat6/pom.xml
===================================================================
--- components/wci/branches/adf/tomcat6/pom.xml 2010-09-29 13:42:11 UTC (rev 4434)
+++ components/wci/branches/adf/tomcat6/pom.xml 2010-09-29 14:30:22 UTC (rev 4435)
@@ -17,12 +17,6 @@
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>catalina</artifactId>
- <exclusions>
- <exclusion>
- <groupId>org.apache.tomcat</groupId>
- <artifactId>servlet-api</artifactId>
- </exclusion>
- </exclusions>
</dependency>
</dependencies>
Modified:
components/wci/branches/adf/tomcat6/src/main/java/org/gatein/wci/tomcat/TC6ServletContainerContext.java
===================================================================
---
components/wci/branches/adf/tomcat6/src/main/java/org/gatein/wci/tomcat/TC6ServletContainerContext.java 2010-09-29
13:42:11 UTC (rev 4434)
+++
components/wci/branches/adf/tomcat6/src/main/java/org/gatein/wci/tomcat/TC6ServletContainerContext.java 2010-09-29
14:30:22 UTC (rev 4435)
@@ -34,6 +34,8 @@
import org.gatein.common.logging.Logger;
import org.gatein.common.logging.LoggerFactory;
import org.gatein.wci.RequestDispatchCallback;
+import org.gatein.wci.authentication.AuthenticationResult;
+import org.gatein.wci.authentication.GenericAuthentication;
import org.gatein.wci.command.CommandDispatcher;
import org.gatein.wci.impl.DefaultServletContainerFactory;
import org.gatein.wci.spi.ServletContainerContext;
@@ -97,8 +99,13 @@
this.registration = null;
}
- public synchronized void containerEvent(ContainerEvent event)
+ public AuthenticationResult login(HttpServletRequest request, HttpServletResponse
response, String userName, String password)
{
+ return GenericAuthentication.getInstance().login(userName,
password.toCharArray());
+ }
+
+ public synchronized void containerEvent(ContainerEvent event)
+ {
if (event.getData() instanceof Host)
{
Host host = (Host)event.getData();
Modified: components/wci/branches/adf/tomcat7/pom.xml
===================================================================
--- components/wci/branches/adf/tomcat7/pom.xml 2010-09-29 13:42:11 UTC (rev 4434)
+++ components/wci/branches/adf/tomcat7/pom.xml 2010-09-29 14:30:22 UTC (rev 4435)
@@ -18,12 +18,6 @@
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-catalina</artifactId>
<version>7.0.2</version>
- <exclusions>
- <exclusion>
- <groupId>org.apache.tomcat</groupId>
- <artifactId>servlet-api</artifactId>
- </exclusion>
- </exclusions>
</dependency>
</dependencies>
Modified:
components/wci/branches/adf/tomcat7/src/main/java/org/gatein/wci/tomcat/TC7ServletContainerContext.java
===================================================================
---
components/wci/branches/adf/tomcat7/src/main/java/org/gatein/wci/tomcat/TC7ServletContainerContext.java 2010-09-29
13:42:11 UTC (rev 4434)
+++
components/wci/branches/adf/tomcat7/src/main/java/org/gatein/wci/tomcat/TC7ServletContainerContext.java 2010-09-29
14:30:22 UTC (rev 4435)
@@ -36,6 +36,8 @@
import org.gatein.common.logging.Logger;
import org.gatein.common.logging.LoggerFactory;
import org.gatein.wci.RequestDispatchCallback;
+import org.gatein.wci.authentication.AuthenticationResult;
+import org.gatein.wci.authentication.ProgrammaticAuthenticationResult;
import org.gatein.wci.command.CommandDispatcher;
import org.gatein.wci.impl.DefaultServletContainerFactory;
import org.gatein.wci.spi.ServletContainerContext;
@@ -98,7 +100,16 @@
this.registration = null;
}
- public synchronized void containerEvent(ContainerEvent event)
+ public AuthenticationResult login(HttpServletRequest request, HttpServletResponse
response, String userName, String password) {
+ try {
+ request.login(userName, password);
+ } catch (ServletException e) {
+ e.printStackTrace();
+ }
+ return new ProgrammaticAuthenticationResult();
+ }
+
+ public synchronized void containerEvent(ContainerEvent event)
{
if (event.getData() instanceof Host)
{
Modified: components/wci/branches/adf/wci/pom.xml
===================================================================
--- components/wci/branches/adf/wci/pom.xml 2010-09-29 13:42:11 UTC (rev 4434)
+++ components/wci/branches/adf/wci/pom.xml 2010-09-29 14:30:22 UTC (rev 4435)
@@ -13,13 +13,12 @@
<dependency>
<groupId>org.gatein.common</groupId>
<artifactId>common-common</artifactId>
- <exclusions>
- <exclusion>
- <groupId>org.codehaus.cargo</groupId>
- <artifactId>cargo-core-uberjar</artifactId>
- </exclusion>
- </exclusions>
</dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
</project>
Modified:
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/ServletContainer.java
===================================================================
---
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/ServletContainer.java 2010-09-29
13:42:11 UTC (rev 4434)
+++
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/ServletContainer.java 2010-09-29
14:30:22 UTC (rev 4435)
@@ -22,6 +22,7 @@
******************************************************************************/
package org.gatein.wci;
+import org.gatein.wci.authentication.AuthenticationResult;
import org.gatein.wci.spi.ServletContainerContext;
import javax.servlet.ServletContext;
@@ -91,4 +92,14 @@
* @throws IllegalArgumentException if the context is null
*/
void register(ServletContainerContext context);
+
+ /**
+ * Authentication support.
+ *
+ * @param request the request valid in the current servlet context
+ * @param response the response valid in the current servlet context
+ * @param userName the username which try to login
+ * @param password the password of the username
+ */
+ AuthenticationResult login(HttpServletRequest request, HttpServletResponse response,
String userName, String password);
}
Modified:
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/Authentication.java
===================================================================
---
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/Authentication.java 2010-09-29
13:42:11 UTC (rev 4434)
+++
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/Authentication.java 2010-09-29
14:30:22 UTC (rev 4435)
@@ -25,7 +25,7 @@
*/
public interface Authentication
{
- public WCICredentials login(String login, char[] password);
+ public AuthenticationResult login(String login, char[] password);
public void logout();
public void addAuthenticationListener(AuthenticationListener listener);
}
Added:
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AuthenticationResult.java
===================================================================
---
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AuthenticationResult.java
(rev 0)
+++
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AuthenticationResult.java 2010-09-29
14:30:22 UTC (rev 4435)
@@ -0,0 +1,28 @@
+/*
+* Copyright (C) 2003-2009 eXo Platform SAS.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+
+package org.gatein.wci.authentication;
+
+/**
+ * @author <a href="mailto:alain.defrance@exoplatform.com">Alain
Defrance</a>
+ * @version $Revision$
+ */
+public interface AuthenticationResult
+{
+}
Modified:
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/GenericAuthentication.java
===================================================================
---
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/GenericAuthentication.java 2010-09-29
13:42:11 UTC (rev 4434)
+++
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/GenericAuthentication.java 2010-09-29
14:30:22 UTC (rev 4435)
@@ -26,16 +26,24 @@
public class GenericAuthentication extends AbstractAuthentication
{
public static final TicketService TICKET_SERVICE = new TicketService();
-
- public WCICredentials login(String login, char[] password)
+ private static final GenericAuthentication GENERIC_AUTHENTICATION = new
GenericAuthentication();
+
+ private GenericAuthentication() {}
+
+ public AuthenticationResult login(String login, char[] password)
{
- WCICredentials credentials = TICKET_SERVICE.validateToken(new String(password),
true);
+ String ticket = TICKET_SERVICE.createTicket(new WCICredentials(login, new
String(password)));
+
fireEvent(EventType.LOGIN, new AuthenticationEvent(login, password));
- return credentials;
+ return new GenericAuthenticationResult(ticket);
}
public void logout()
{
fireEvent(EventType.LOGOUT, new AuthenticationEvent("", new char[1]));
}
-}
+
+ public static GenericAuthentication getInstance() {
+ return GENERIC_AUTHENTICATION;
+ }
+}
\ No newline at end of file
Added:
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/GenericAuthenticationResult.java
===================================================================
---
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/GenericAuthenticationResult.java
(rev 0)
+++
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/GenericAuthenticationResult.java 2010-09-29
14:30:22 UTC (rev 4435)
@@ -0,0 +1,36 @@
+/*
+* Copyright (C) 2003-2009 eXo Platform SAS.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+
+package org.gatein.wci.authentication;
+
+/**
+ * @author <a href="mailto:alain.defrance@exoplatform.com">Alain
Defrance</a>
+ * @version $Revision$
+ */
+public class GenericAuthenticationResult implements AuthenticationResult {
+ private String ticket;
+
+ public GenericAuthenticationResult(String ticket) {
+ this.ticket = ticket;
+ }
+
+ public String getTicket() {
+ return ticket;
+ }
+}
Added:
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/ProgrammaticAuthenticationResult.java
===================================================================
---
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/ProgrammaticAuthenticationResult.java
(rev 0)
+++
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/ProgrammaticAuthenticationResult.java 2010-09-29
14:30:22 UTC (rev 4435)
@@ -0,0 +1,27 @@
+/*
+* Copyright (C) 2003-2009 eXo Platform SAS.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+
+package org.gatein.wci.authentication;
+
+/**
+ * @author <a href="mailto:alain.defrance@exoplatform.com">Alain
Defrance</a>
+ * @version $Revision$
+ */
+public class ProgrammaticAuthenticationResult implements AuthenticationResult {
+}
Modified:
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/impl/DefaultServletContainer.java
===================================================================
---
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/impl/DefaultServletContainer.java 2010-09-29
13:42:11 UTC (rev 4434)
+++
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/impl/DefaultServletContainer.java 2010-09-29
14:30:22 UTC (rev 4435)
@@ -22,6 +22,7 @@
******************************************************************************/
package org.gatein.wci.impl;
+import org.gatein.wci.authentication.AuthenticationResult;
import org.gatein.wci.spi.ServletContainerContext;
import org.gatein.wci.spi.WebAppContext;
import org.gatein.wci.WebAppListener;
@@ -88,8 +89,14 @@
}
}
- public WebExecutor getExecutor(HttpServletRequest request, HttpServletResponse
response)
+ /** . */
+ public AuthenticationResult login(HttpServletRequest request, HttpServletResponse
response, String userName, String password)
{
+ return registration.context.login(request, response, userName, password);
+ }
+
+ public WebExecutor getExecutor(HttpServletRequest request, HttpServletResponse
response)
+ {
throw new NotYetImplemented();
}
Modified:
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/impl/generic/GenericServletContainerContext.java
===================================================================
---
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/impl/generic/GenericServletContainerContext.java 2010-09-29
13:42:11 UTC (rev 4434)
+++
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/impl/generic/GenericServletContainerContext.java 2010-09-29
14:30:22 UTC (rev 4435)
@@ -23,6 +23,8 @@
package org.gatein.wci.impl.generic;
import org.gatein.wci.RequestDispatchCallback;
+import org.gatein.wci.authentication.AuthenticationResult;
+import org.gatein.wci.authentication.GenericAuthentication;
import org.gatein.wci.impl.DefaultServletContainerFactory;
import org.gatein.wci.spi.ServletContainerContext;
import org.gatein.wci.command.CommandDispatcher;
@@ -128,8 +130,13 @@
this.registration = null;
}
- //
+ public AuthenticationResult login(HttpServletRequest request, HttpServletResponse
response, String userName, String password)
+ {
+ return GenericAuthentication.getInstance().login(userName,
password.toCharArray());
+ }
+ //
+
public void contextInitialized(ServletContextEvent servletContextEvent)
{
if (instance != null)
Modified:
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/spi/ServletContainerContext.java
===================================================================
---
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/spi/ServletContainerContext.java 2010-09-29
13:42:11 UTC (rev 4434)
+++
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/spi/ServletContainerContext.java 2010-09-29
14:30:22 UTC (rev 4435)
@@ -23,6 +23,7 @@
package org.gatein.wci.spi;
import org.gatein.wci.RequestDispatchCallback;
+import org.gatein.wci.authentication.AuthenticationResult;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -74,6 +75,16 @@
void unsetCallback(Registration registration);
/**
+ * Authentication support.
+ *
+ * @param request the request valid in the current servlet context
+ * @param response the response valid in the current servlet context
+ * @param userName the username which try to login
+ * @param password the password of the username
+ */
+ AuthenticationResult login(HttpServletRequest request, HttpServletResponse response,
String userName, String password);
+
+ /**
* The callback interface that a servlet container context can obtain from its
registration against
* the <code>org.jboss.portal.web.ServletContainer</code> singleton.
*/