• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Cross context SSO

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • Quote
  • Report post to moderator
Created an issue
[originally posted on jforum.net by Deady]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!