On Wed, Mar 11, 2009 at 3:23 PM, Ashish Kulkarni
<ashish.kulkarn...@gmail.com> wrote:
> HiI was able to configure LDAP to do authentication, but how do i use
> UserDetailsService,
> is there any example of how to use this and implement it in my project to
> get user and role from DB2 database
>
>

UserDetailsService is an interface... You have to write an implementation.

In your implementation, you can bounce the username / password against
LDAP, then pull roles for the user out of DB2. Since Spring Security
is open source, check the source for their LDAP implementation to see
how to authorize against LDAP. As far as DB2 goes, since it is a
database, you'll have to decide how you're going to talk to it (JPA,
Hibernate, JDBC, iBatis, raw socket), then google for some examples.
As for wiring your implementation, check the Spring docs. Past that,
you may start to get flamed, this no longer has anything to do with
Struts.

-Wes

-- 
Wes Wannemacher
Author - Struts 2 In Practice
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
http://www.manning.com/wannemacher

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to