Wow!  I didn't know about Acegi, it's really wonderful! [ learning..... ]

Thank's!


On Tue, Sep 9, 2008 at 11:35 AM, m4rkuz <[EMAIL PROTECTED]> wrote:

>
> AppFuse uses Spring Security (Aka Acegi)
>
> So the code below should work...
>
>
> *          UsernamePasswordAuthenticationToken auth =
>           (UsernamePasswordAuthenticationToken)
>           SecurityContextHolder.getContext().getAuthentication();
>           WebAuthenticationDetails details = (WebAuthenticationDetails)
>           auth.getDetails(); String ip = details.getRemoteAddress();
>           org.springframework.security.userdetails.User user =
>           (org.springframework.security.userdetails.User)
> auth.getPrincipal();
>           String name = user.getUsername();
> *
>
>
>
>
> On Tue, Sep 9, 2008 at 9:24 AM, Mauri Ferreyra <[EMAIL PROTECTED]> wrote:
>
>> Where's set the variable remoteUser??
>> I've a problem, when I use page without decorators remoteUser and
>> session.SPRING_SECURITY_CONTEXT.authentication.principal.username is set,
>> but when I want use a decorator, this variables have value "".
>>
>> Exists some interceptor o filter that set the current user?
>>
>> Regards
>>
>> On Wed, Aug 20, 2008 at 12:40 PM, krishgy <[EMAIL PROTECTED]> wrote:
>>
>>>
>>> See this
>>>
>>> http://www.nabble.com/How-to-get-user-from-session-td18216209s2369.html#a18216209
>>>
>>>
>>>
>>>
>>> Mauriff wrote:
>>> >
>>> > Hello guys! I need obtain the logger user, I'm using
>>> > ${session.SPRING_SECURITY_LAST_USERNAME}, But I want the user object, I
>>> > saw
>>> > in SPRING_SECURITY_CONTEXT but I don't know how obtain that.
>>> >
>>> > Any suggest?
>>> >
>>> > Regards
>>> >
>>> >
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/How-obtain-logged-user--tp19070354s2369p19070450.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]
>>>
>>>
>>
>>
>> --
>> Mauricio F. Ferreyra |tel #: (0351) 156-623072 | Cordoba - Argentina
>>
>
>
>
> --
> Cordialmente,
>
>
> Marcus V. Sánchez D.
> ______________________
> Enterprise Developer.
> Sun Certified Java Programmer (SCJP)
>



-- 
Mauricio F. Ferreyra |tel #: (0351) 156-623072 | Cordoba - Argentina

Reply via email to