[jboss-svn-commits] JBL Code SVN: r33126 - in labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main: java/org and 8 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Thu May 27 11:46:13 EDT 2010
Author: lkrzyzanek
Date: 2010-05-27 11:46:12 -0400 (Thu, 27 May 2010)
New Revision: 33126
Added:
labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/java/org/
labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/java/org/jboss/
labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/java/org/jboss/labs/
labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/java/org/jboss/labs/sbs/
labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/java/org/jboss/labs/sbs/plugin/
labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/java/org/jboss/labs/sbs/plugin/nukesauth/
labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/java/org/jboss/labs/sbs/plugin/nukesauth/NukesAccountManager.java
labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/java/org/jboss/labs/sbs/plugin/nukesauth/NukesAccountManagerImpl.java
labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/java/org/jboss/labs/sbs/plugin/nukesauth/SbsAccountManager.java
labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/java/org/jboss/labs/sbs/plugin/nukesauth/SbsAccountManagerImpl.java
labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/java/org/jboss/labs/sbs/plugin/nukesauth/dao/
labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/java/org/jboss/labs/sbs/plugin/nukesauth/dao/NukesUser.java
labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/java/org/jboss/labs/sbs/plugin/nukesauth/filter/
labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/java/org/jboss/labs/sbs/plugin/nukesauth/filter/NukesSyncFilter.java
Modified:
labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/plugin/spring.xml
Log:
ORG-606 - Skeleton of implementation of Nukes authentication plugin
Added: labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/java/org/jboss/labs/sbs/plugin/nukesauth/NukesAccountManager.java
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/java/org/jboss/labs/sbs/plugin/nukesauth/NukesAccountManager.java (rev 0)
+++ labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/java/org/jboss/labs/sbs/plugin/nukesauth/NukesAccountManager.java 2010-05-27 15:46:12 UTC (rev 33126)
@@ -0,0 +1,64 @@
+/*
+ * JBoss Community http://jboss.org/
+ *
+ * Copyright (c) 2010 Red Hat Middleware, LLC. All rights reserved.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT A 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, v.2.1 along with this distribution; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA.
+ *
+ * Red Hat Author(s): Libor Krzyzanek
+ */
+package org.jboss.labs.sbs.plugin.nukesauth;
+
+import java.util.List;
+
+import org.acegisecurity.BadCredentialsException;
+import org.acegisecurity.userdetails.UsernameNotFoundException;
+import org.jboss.labs.sbs.plugin.nukesauth.dao.NukesUser;
+
+/**
+ * Manager for Nukes Accounts
+ *
+ * @author <a href="mailto:lkrzyzan at redhat.com">Libor Krzyzanek</a>
+ */
+public interface NukesAccountManager {
+
+ /**
+ * Authenticate user against Nukes Users
+ *
+ * @param username
+ * @param password
+ * @throws UsernameNotFoundException user not in Nukes DB
+ * @throws BadCredentialsException password doesn't match username
+ */
+ public void authenticateNukesUser(String username, String password) throws UsernameNotFoundException,
+ BadCredentialsException;
+
+ /**
+ * Get Nukes Accounts by e-mail
+ *
+ * @param email
+ * @return list of nukes users. Never is null.
+ */
+ public List<NukesUser> getNukesAccountsByEmail(String email);
+
+ /**
+ * Get Nukes account by username
+ *
+ * @param username
+ * @return nukes account or null if no account matches username.
+ */
+ public NukesUser getAccountByUsername(String username);
+
+}
Property changes on: labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/java/org/jboss/labs/sbs/plugin/nukesauth/NukesAccountManager.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/java/org/jboss/labs/sbs/plugin/nukesauth/NukesAccountManagerImpl.java
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/java/org/jboss/labs/sbs/plugin/nukesauth/NukesAccountManagerImpl.java (rev 0)
+++ labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/java/org/jboss/labs/sbs/plugin/nukesauth/NukesAccountManagerImpl.java 2010-05-27 15:46:12 UTC (rev 33126)
@@ -0,0 +1,56 @@
+/*
+ * JBoss Community http://jboss.org/
+ *
+ * Copyright (c) 2010 Red Hat Middleware, LLC. All rights reserved.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT A 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, v.2.1 along with this distribution; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA.
+ *
+ * Red Hat Author(s): Libor Krzyzanek
+ */
+package org.jboss.labs.sbs.plugin.nukesauth;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.acegisecurity.BadCredentialsException;
+import org.acegisecurity.userdetails.UsernameNotFoundException;
+import org.jboss.labs.sbs.plugin.nukesauth.dao.NukesUser;
+
+/**
+ * Database implementation of manager
+ *
+ * @author <a href="mailto:lkrzyzan at redhat.com">Libor Krzyzanek</a>
+ */
+public class NukesAccountManagerImpl implements NukesAccountManager {
+
+ @Override
+ public void authenticateNukesUser(String username, String password) throws UsernameNotFoundException,
+ BadCredentialsException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public NukesUser getAccountByUsername(String username) {
+ // TODO Auto-generated method stub
+ return new NukesUser();
+ }
+
+ @Override
+ public List<NukesUser> getNukesAccountsByEmail(String email) {
+ return new ArrayList<NukesUser>();
+ }
+
+}
Property changes on: labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/java/org/jboss/labs/sbs/plugin/nukesauth/NukesAccountManagerImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/java/org/jboss/labs/sbs/plugin/nukesauth/SbsAccountManager.java
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/java/org/jboss/labs/sbs/plugin/nukesauth/SbsAccountManager.java (rev 0)
+++ labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/java/org/jboss/labs/sbs/plugin/nukesauth/SbsAccountManager.java 2010-05-27 15:46:12 UTC (rev 33126)
@@ -0,0 +1,48 @@
+/*
+ * JBoss Community http://jboss.org/
+ *
+ * Copyright (c) 2010 Red Hat Middleware, LLC. All rights reserved.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT A 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, v.2.1 along with this distribution; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA.
+ *
+ * Red Hat Author(s): Libor Krzyzanek
+ */
+package org.jboss.labs.sbs.plugin.nukesauth;
+
+import org.jboss.labs.sbs.plugin.nukesauth.dao.NukesUser;
+
+import com.jivesoftware.base.User;
+
+/**
+ * Manager for SBS Accounts
+ *
+ * @author <a href="mailto:lkrzyzan at redhat.com">Libor Krzyzanek</a>
+ */
+public interface SbsAccountManager {
+
+ /**
+ * Create SBS Account based on Nukes user
+ */
+ public void createAccount(NukesUser nukesUser);
+
+ /**
+ * Update password. No events is not fired
+ *
+ * @param user
+ * @param password
+ */
+ public void updatePassword(User user, String password);
+
+}
Property changes on: labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/java/org/jboss/labs/sbs/plugin/nukesauth/SbsAccountManager.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/java/org/jboss/labs/sbs/plugin/nukesauth/SbsAccountManagerImpl.java
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/java/org/jboss/labs/sbs/plugin/nukesauth/SbsAccountManagerImpl.java (rev 0)
+++ labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/java/org/jboss/labs/sbs/plugin/nukesauth/SbsAccountManagerImpl.java 2010-05-27 15:46:12 UTC (rev 33126)
@@ -0,0 +1,54 @@
+/*
+ * JBoss Community http://jboss.org/
+ *
+ * Copyright (c) 2010 Red Hat Middleware, LLC. All rights reserved.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT A 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, v.2.1 along with this distribution; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA.
+ *
+ * Red Hat Author(s): Libor Krzyzanek
+ */
+package org.jboss.labs.sbs.plugin.nukesauth;
+
+import org.jboss.labs.sbs.plugin.nukesauth.dao.NukesUser;
+
+import com.jivesoftware.base.User;
+import com.jivesoftware.base.UserManager;
+
+/**
+ * Implementation of SBS Account manager
+ *
+ * @author <a href="mailto:lkrzyzan at redhat.com">Libor Krzyzanek</a>
+ */
+public class SbsAccountManagerImpl implements SbsAccountManager {
+
+ private UserManager userManager;
+
+ @Override
+ public void createAccount(NukesUser nukesUser) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void updatePassword(User user, String password) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setUserManager(UserManager userManager) {
+ this.userManager = userManager;
+ }
+
+}
Property changes on: labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/java/org/jboss/labs/sbs/plugin/nukesauth/SbsAccountManagerImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/java/org/jboss/labs/sbs/plugin/nukesauth/dao/NukesUser.java
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/java/org/jboss/labs/sbs/plugin/nukesauth/dao/NukesUser.java (rev 0)
+++ labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/java/org/jboss/labs/sbs/plugin/nukesauth/dao/NukesUser.java 2010-05-27 15:46:12 UTC (rev 33126)
@@ -0,0 +1,51 @@
+/*
+ * JBoss Community http://jboss.org/
+ *
+ * Copyright (c) 2010 Red Hat Middleware, LLC. All rights reserved.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT A 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, v.2.1 along with this distribution; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA.
+ *
+ * Red Hat Author(s): Libor Krzyzanek
+ */
+package org.jboss.labs.sbs.plugin.nukesauth.dao;
+
+/**
+ * Nukes User value object
+ *
+ * @author <a href="mailto:lkrzyzan at redhat.com">Libor Krzyzanek</a>
+ */
+public class NukesUser {
+
+ private String username;
+
+ private String email;
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+}
Property changes on: labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/java/org/jboss/labs/sbs/plugin/nukesauth/dao/NukesUser.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/java/org/jboss/labs/sbs/plugin/nukesauth/filter/NukesSyncFilter.java
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/java/org/jboss/labs/sbs/plugin/nukesauth/filter/NukesSyncFilter.java (rev 0)
+++ labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/java/org/jboss/labs/sbs/plugin/nukesauth/filter/NukesSyncFilter.java 2010-05-27 15:46:12 UTC (rev 33126)
@@ -0,0 +1,180 @@
+/*
+ * JBoss Community http://jboss.org/
+ *
+ * Copyright (c) 2010 Red Hat Middleware, LLC. All rights reserved.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT A 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, v.2.1 along with this distribution; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA.
+ *
+ * Red Hat Author(s): Libor Krzyzanek
+ */
+package org.jboss.labs.sbs.plugin.nukesauth.filter;
+
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.FilterChain;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.acegisecurity.AuthenticationException;
+import org.apache.log4j.LogManager;
+import org.apache.log4j.Logger;
+import org.jboss.labs.sbs.plugin.nukesauth.NukesAccountManager;
+import org.jboss.labs.sbs.plugin.nukesauth.SbsAccountManager;
+import org.jboss.labs.sbs.plugin.nukesauth.dao.NukesUser;
+
+import com.jivesoftware.base.User;
+import com.jivesoftware.base.UserManager;
+import com.jivesoftware.base.UserNotFoundException;
+import com.jivesoftware.community.aaa.JiveAuthenticationProcessingFilter;
+import com.jivesoftware.community.user.profile.ProfileFieldValue;
+import com.jivesoftware.community.user.profile.ProfileManager;
+
+/**
+ * Filter synchronizes Nukes account with SBS account during login process
+ *
+ * @author <a href="mailto:lkrzyzan at redhat.com">Libor Krzyzanek</a>
+ */
+public class NukesSyncFilter extends JiveAuthenticationProcessingFilter {
+
+ private static final Logger log = LogManager.getLogger(NukesSyncFilter.class);
+
+ private ProfileManager profileManager;
+
+ private NukesAccountManager nukesAccountManager;
+
+ private SbsAccountManager sbsAccountManager;
+
+ private UserManager userManager;
+
+ private Long accountSynchronizedFiled = new Long(5010);
+
+ @Override
+ public void afterPropertiesSet() throws Exception {
+ // do nothing - this is only sync filter - it doesn't do login.
+ }
+
+ @Override
+ public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException,
+ ServletException {
+
+ if (!(request instanceof HttpServletRequest)) {
+ throw new ServletException("Can only process HttpServletRequest");
+ }
+
+ if (!(response instanceof HttpServletResponse)) {
+ throw new ServletException("Can only process HttpServletResponse");
+ }
+
+ HttpServletRequest httpRequest = (HttpServletRequest) request;
+ HttpServletResponse httpResponse = (HttpServletResponse) response;
+
+ if (requiresAuthentication(httpRequest, httpResponse)) {
+ String username = obtainUsername(httpRequest);
+ String password = obtainPassword(httpRequest);
+
+ if ("admin".equals(username)) {
+ chain.doFilter(request, response);
+ return;
+ }
+
+ User user = null;
+ try {
+ user = userManager.getUser(username);
+ if (isAccountSynchronized(user)) {
+ log.debug("User is synchronized");
+ chain.doFilter(request, response);
+ return;
+ }
+ } catch (UserNotFoundException e) {
+ // let continue and try nukes authentication
+ }
+
+ if (log.isInfoEnabled()) {
+ log.info("Synchronize Nukes account: " + username);
+ }
+ try {
+ nukesAccountManager.authenticateNukesUser(username, password);
+ } catch (AuthenticationException failed) {
+ // Authentication failed - let following filters to handle 'not
+ // authorized' action
+ chain.doFilter(request, response);
+ return;
+ }
+
+ if (user != null) {
+ log.debug("SBS account exists");
+ List<NukesUser> nukesAccounts = nukesAccountManager.getNukesAccountsByEmail(user.getEmail());
+
+ if (nukesAccounts.size() > 1) {
+ // TODO: handle one SBS account and more nukes accounts
+
+ // update Nukes duplicate accounts
+ } else {
+ sbsAccountManager.updatePassword(user, password);
+ }
+ } else {
+ log.debug("SBS account does NOT exist");
+ NukesUser nukesUser = nukesAccountManager.getAccountByUsername(username);
+
+ List<NukesUser> dupliciteAccounts = nukesAccountManager.getNukesAccountsByEmail(nukesUser.getEmail());
+ // TODO: Check if we don't have SBS accounts without Nukes account
+ if (dupliciteAccounts.size() > 1) {
+ // TODO: Handle No SBS account and duplicate Nukes accounts.
+ } else {
+ log.info("No SBS accoutn and one nukes account. Going to create SBS account");
+ sbsAccountManager.createAccount(nukesUser);
+ }
+ }
+
+ // TODO set account synchronized flag to true
+ log.info("Account is fully synchronized");
+
+ }
+ chain.doFilter(request, response);
+ }
+
+ private boolean isAccountSynchronized(User user) {
+ Map<Long, ProfileFieldValue> profile = profileManager.getProfile(user);
+ ProfileFieldValue accountSync = profile.get(accountSynchronizedFiled);
+ log.info("accountSync: " + accountSync);
+
+ if (accountSync != null && "true".equalsIgnoreCase(accountSync.getValue())) {
+ return true;
+ }
+ return false;
+ }
+
+ public void setProfileManager(ProfileManager profileManager) {
+ this.profileManager = profileManager;
+ }
+
+ public void setNukesAccountManager(NukesAccountManager nukesAccountManager) {
+ this.nukesAccountManager = nukesAccountManager;
+ }
+
+ public void setSbsAccountManager(SbsAccountManager sbsAccountManager) {
+ this.sbsAccountManager = sbsAccountManager;
+ }
+
+ public void setUserManager(UserManager userManager) {
+ this.userManager = userManager;
+ }
+
+}
Property changes on: labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/java/org/jboss/labs/sbs/plugin/nukesauth/filter/NukesSyncFilter.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/plugin/spring.xml
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/plugin/spring.xml 2010-05-27 15:12:48 UTC (rev 33125)
+++ labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/plugin/spring.xml 2010-05-27 15:46:12 UTC (rev 33126)
@@ -6,5 +6,29 @@
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd">
+ <!--
+ Filter chain that is processed right after the
+ httpSessionContextIntegrationFilter has been processed
+ -->
+ <bean id="pluginPostSessionContextFilterChain"
+ class="org.jboss.labs.sbs.plugin.nukesauth.filter.NukesSyncFilter">
+ <property name="nukesAccountManager" ref="nukesAccountManager" />
+ <property name="sbsAccountManager" ref="sbsAccountManager" />
+ <property name="userManager" ref="userManager" />
+ <property name="profileManager" ref="profileManager" />
+ <property name="filterProcessesUrl">
+ <value>/cs_login</value> <!-- Must be exactly same like in formAuthenticationFilter -->
+ </property>
+ </bean>
+ <bean id="nukesAccountManager"
+ class="org.jboss.labs.sbs.plugin.nukesauth.NukesAccountManagerImpl">
+ </bean>
+
+ <bean id="sbsAccountManager"
+ class="org.jboss.labs.sbs.plugin.nukesauth.SbsAccountManagerImpl">
+ <property name="userManager" ref="userManager" />
+ </bean>
+
+
</beans>
More information about the jboss-svn-commits
mailing list