[jboss-user] [JBoss Seam] - Re: Where to invoke implicit login for custom SSO?

stu2 do-not-reply at jboss.com
Thu Nov 15 10:24:17 EST 2007


Got it!

Approach stolen from AuthenticationFilter.  Essentially the issue is that identity.login() needs to run with Seam contexts initialized, BUT the filter apparently runs before these are initialized by Seam.  Here's what works:

        new ContextualHttpServletRequest(request)
  |         {
  |            @Override
  |            public void process() throws ServletException, IOException
  |            {
  |                String loginResult = identity.login();
  |                log.info("identity.login() returned #0.  Logged in? #1", loginResult, identity.isLoggedIn(false));
  |            }
  |         }.run();  
  | 

Also, the ideal place for this sort of SSO looks to me to be in a SessionListener.  But at that point there's no request available, so I'm not sure how to initialize the environment.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4105070#4105070

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4105070



More information about the jboss-user mailing list