RE: Getting the authenticated user from Spring Security for use in an Action

2010-03-17 Thread Lance Hill
authenticated user from Spring Security for use in an Action Try: SecurityContextHolder.getContext().getAuthentication().getPrincipal() -Original Message- From: Lance Hill [mailto:la...@baldhead.com] Sent: Tuesday, March 16, 2010 5:15 PM To: 'Struts Users Mailing List' Subject: G

RE: Getting the authenticated user from Spring Security for use in an Action

2010-03-17 Thread Hoying, Ken
Try: SecurityContextHolder.getContext().getAuthentication().getPrincipal() -Original Message- From: Lance Hill [mailto:la...@baldhead.com] Sent: Tuesday, March 16, 2010 5:15 PM To: 'Struts Users Mailing List' Subject: Getting the authenticated user from Spring Security for

RE: Getting the authenticated user from Spring Security for use in an Action

2010-03-16 Thread Lance Hill
] Sent: Tuesday, March 16, 2010 5:54 PM To: Struts Users Mailing List Subject: Re: Getting the authenticated user from Spring Security for use in an Action I use - SecurityContextHolder.getContext().getAuthentication() I assume that if the object returned is null, then the user isn't logged in.

Re: Getting the authenticated user from Spring Security for use in an Action

2010-03-16 Thread Wes Wannemacher
xt() is returning an empty SecurityContext and > I am not sure if that is the best way to access the user. > > > -Original Message- > From: Wes Wannemacher [mailto:w...@wantii.com] > Sent: Tuesday, March 16, 2010 5:16 PM > To: Struts Users Mailing List > Subject: Re: G

RE: Getting the authenticated user from Spring Security for use in an Action

2010-03-16 Thread Lance Hill
authenticated user from Spring Security for use in an Action What mechanism are you using to handle authentication/authorization? -Wes On Tue, Mar 16, 2010 at 5:14 PM, Lance Hill wrote: > I need to access information about the currently logged in user. I don't > think putting the us

Re: Getting the authenticated user from Spring Security for use in an Action

2010-03-16 Thread Wes Wannemacher
What mechanism are you using to handle authentication/authorization? -Wes On Tue, Mar 16, 2010 at 5:14 PM, Lance Hill wrote: > I need to access information about the currently logged in user. I don't > think putting the user into the session during login is how it is supposed > to be done, but I

Getting the authenticated user from Spring Security for use in an Action

2010-03-16 Thread Lance Hill
I need to access information about the currently logged in user. I don't think putting the user into the session during login is how it is supposed to be done, but I have not found examples of how to get access to the current user from Spring/Spring Security. Can someone please provide a link or br