Jun 29th, 2006, 06:42 PM
Accessing Acegi UserDetails From Spring
Sorry, this should probably go in the Acegi forum (thought this was that).
I'm attempting to plug Acegi into a JSF+Spring application using SiteMinder for authentication. I've gotten everything configured with the modification to DaoAuthenticationProvider mentioned in the Reference Guide, section 9.2, and an implementation of UserDetailsService to access our anemic domain model and return an implementation of UserDetails. So authentication is basically in place.
Now the question is how to wire this UserDetails instance into the rest of the JSF+Spring application. It seems like there should be a way to configure a "user" bean in Spring to point to SecurityContextHolder.getContext().getAuthenticati on().getPrincipal() so it can be injected into JSF components through faces-config.xml, injected into application classes through Spring configurations, etc. However, after searching around the documentation here and Googling I can't seem to find a simple configuration based mechanism for this.
Or is the solution to create a new user bean which delegates to Acegi's SecurityContextHolder...getPrincipal()?
Last edited by timfulmer; Jun 29th, 2006 at 06:46 PM.
Reason: Wrong Topic