• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Cross context SSO

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To enable SSO you are to implement net.jforum.sso.SSO.
authenticateUser(RequestContext request) recieves RequestContext object, which doesn't have access to HttpServletContext, so it is impossible to get data from another context. You are limited to use coockies or http params, which are unsecured.

My situation is: i have webapp (name it ROOT) with login page. When user logs in, I put everithing about him in session context. Now then user goes to forum, I want to get his cridentals from ROOT session context, so nothing is kept on client side expect of JSESSIONID cockie.

As you know, from Servlets API 2.5 session context is individual per context, so I have no oppotunity to reach ROOT context. It would be nice to add

into net.jforum.sso.SSO interface, or to add

method into net.jforum.context.RequestContext intarface.
[originally posted on jforum.net by Deady]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A quick (and dirty) fix is to cast the interface object as the real object, WebRequestContext. This extends the standard HTTPRequestWrapper and gives you all the methods you need. Your SSO code would break in non-web situations... but that would probably be the case anyway.

But you might want to open a JIRA issue on this just to make sure this possible problem doesn't get lost.
[originally posted on jforum.net by monroe]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Created an issue
[originally posted on jforum.net by Deady]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic