Authentication.getPrincipal() is your friend here.
Gareth
On 5 Feb 2008, at 06:05, [EMAIL PROTECTED] wrote:
Matt,
Yes, that was referred to earlier and I did check out the code in
UserSecurityAdvice.
The code in UserSecurityAdvice uses SecurityContextHolder to return a
SecurityContext that in turn returns an Authorization. From this the
getDetails() method returns the IP address and session id, as in:
auth.details='[EMAIL PROTECTED]:
RemoteIpAddress: 127.0.0.1; SessionId: cfcczg0dp2y3'
The "before" method in UserSecurityAdvice does work with the User
object,
but only as a passed in parameter:
User user = (User) args[0];
So, I'm still missing something as far as how to get the logged in
User
object using SecurityContextHolder.
Thanks to all for the guidance and patience. I'm almost there.
- Richard
--
View this message in context:
http://www.nabble.com/How-to-get-authentication-info-into-a-Spring-bean---Hibernate-interceptor-tp15247474s2369p15284075.html
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]