Hi GreenHorn,
I had a similar problem and got around it by using the security.xml that
comes with appfuse and adding the following:
<beans:bean id="adminAuthenticationProcessingFilter"
class="org.springframework.security.ui.webapp.AuthenticationProcessingFilter">
<beans:property name="filterProcessesUrl"
value="/admin/j_security_check_admin" />
<beans:property name="defaultTargetUrl" value="/admin/mainMenu.html"/>
<beans:property name="authenticationFailureUrl"
value="/admin/login.jsp?error=true"/>
<beans:property name="authenticationManager"
ref="authenticationManagerAlias"/>
<custom-filter after="AUTHENTICATION_PROCESSING_FILTER" />
</beans:bean>
So, we have an admin section for admins and a user section for regular
users. They both have different look and feels for business reasons. The
user section is handled by the config shipped with appfuse and the admin
section with the above config.
<beans:bean id="sessionExpirationFilter"
class="com.mycompany.filter.SessionExpirationFilter">
<custom-filter after="LOGOUT_FILTER" />
</beans:bean>
We also added the above because we noticed that when your session times
out on the admin site and you try to access a page, it was redirecting
the user to the user site not the admin site as expected. Dont know if
this is the best approach but it works! I can post the source for the
SessionExpirationFilter if required.
Note: j_security_check_admin will need to be used in your "admin" login
page.
Philip
Greenhorn2005 wrote:
Hi,
I am trying to construct another login based on another table i created. I
am using appfuse 2.0.2. As the appfuse have one login once we start the
application. I wanted to create a login after this one. That is to say that
the first login is based on the table app_user. I want to create another
login based on another table (say membership). How would I do this. I have
already created login form. with the usual j_security_check.
<form method="POST" action='<%=response.encodeURL("j_security_check")%>'>
Username :<input type="text" name="j_username" size="10"><br />
Password :<input type="password" name="j_password" size="10"><br />
</form>
If I do the second login and submit it, it will redirect to the first login
with message saying "Invalid username and/or password, please try again."
Any hints how to solve this problem?????
Thanks..
GreenHorn
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]