Hi,
I generated a Spring MVC based application using appfuse:gen. Now I am
trying to change the Authentication scheme from DB to LDAP based. I would
like to keep the source of Roles
from the DB (this works after some other issue with
http://www.nabble.com/forum/ViewPost.jtp?post=13300084&framed=y&skin=2369
footer.jsp ).
Maybe there is a simpler way for me to do authentication against LDAP and do
the authorization against the DB, please let me know if I am on the wrong
track here... be here's what I've done and I were I am stuck...
I have extended DefaultLdapAuthoritiesPopulator in order to provide Roles
from both LDAP and the DB. This work fine, I can log in and edit my entities
just fine.
The issue is when I want to edit/add a new user (assuming he/she exists in
LDAP). On save I get this exception:
java.lang.ClassCastException:
org.acegisecurity.userdetails.ldap.LdapUserDetailsImpl
at
org.appfuse.service.UserSecurityAdvice.getCurrentUser(UserSecurityAdvice.java:135)
at
org.appfuse.service.UserSecurityAdvice.before(UserSecurityAdvice.java:68)
After looking at UserSecurityAdvice.java I can see that the userDetails
and/or the principal are
downcasted to org.appfuse.model.User, which is not going to work when Ldap
is used for
auth/authz.
For this reason I wanted to replace the
org.appfuse.service.UserSecurityAdvice class with my own Advice class, but
the advice is defined in applicationContext-service.xml inside
appfuse-service-2.0.jar...
How can I replace it with my own advice?
In advance thank you for your help with this matter.
Florian
--
View this message in context:
http://www.nabble.com/How-to-override-org.appfuse.service.UserSecurityAdvice--tf4673328s2369.html#a13351431
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]