https://cwiki.apache.org/WICKET/spring-security-and-wicket-auth-roles.html#SpringSecurityandWicket-auth-roles-Wicketsetup and call SecureSession.get().getUser()
Žilvinas Vilutis Mobile: (+370) 652 38353 E-mail: cika...@gmail.com On Tue, Mar 22, 2011 at 6:13 PM, Mansour Al Akeel <mansour.alak...@gmail.com> wrote: > Woops forgot to include the way I am getting the request. > > private User getLoggedInUser() { > ServletWebRequest servletWebRequest = (ServletWebRequest) RequestCycle > .get().getRequest(); > HttpServletRequest request = servletWebRequest.getContainerRequest(); > Principal principal = request.getUserPrincipal(); > User user = (User) principal; > return user; > } > > I appreciate your help. > > > On Tue Mar 22,2011 08:42 pm, Mansour Al Akeel wrote: >> Hello all, >> >> I am authenticating a user, and it's working fine through our own Jaas >> module implementation. However, I am trying to get one of the Panels to >> display based on the logged in user. I am not using wicket-aut yet, and >> looking to do this by obtaining the Principal implementaton from the >> HttpServletRequest. I am getting null when I do so. >> >> I am trying to avoid diving into wicket specific implementation related >> to auth because I am a bit on a tight dead line. >> >> How would others deal with this issue? >> If you have a component to be displayed depending on the logged in user, >> how can I get the logged in user ? >> >> >> Thank you in advance. >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org