How to retrieve the currently logged in user from SecuredWicketSession

7 views
Skip to first unread message

ferjon

unread,
Oct 10, 2010, 7:35:42 AM10/10/10
to xaloon
This is to show the currently logged in user in the header of the page
like "Welcome, john".

Will I be getting it from this session or is there another way of
doing this?

Please help.

Thanks,

ferjon

unread,
Oct 10, 2010, 10:21:49 AM10/10/10
to xaloon
I was able to get the name to view from securityFacade injected to the
StartupApplication.java

Vytautas Racelis

unread,
Oct 10, 2010, 1:33:52 PM10/10/10
to xal...@googlegroups.com
Hi,
there is class named org.xaloon.wicket.component.security.SecurityFacade, which has a method getCurrentUserDisplayName();

There is org.xaloon.wicket.component.customer.panel.HeaderPanel, which uses this interface to show current username with logout link.

There is org.xaloon.wicket.component.security.impl.DefaultSecurityFacadeImpl which implements SecurityFacade and uses Spring security.
You may provide your custome security facade implementation if required.

I'll try to document more this case in 1.5 version ;)

--
Regards,
Vytautas Racelis
-----------------------------------
phone:+370-600-34389
www.xaloon.org
www.allcarindex.com
www.leenle.com

Reply all
Reply to author
Forward
0 new messages