• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

about 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
I have a service method in my class that implement user login.

while I use jforum SSO function , need I change this class implement the jforum sso interface? I use session to save my user login information, not cookie. so I need more help after read support document, because it is use cookie save user login information.


[originally posted on jforum.net by Patrick]
 
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
You have to have a class that implements the "SSO" interface.

Therefore you have two avaiable methods that need to be implemented. You can see a simple example with the RemoteUserSSO class.

You aswell need to specifiy your sso implementation class in the jforum-custom.conf (or the systemglobals.conf if you feel like it) ...

[originally posted on jforum.net by Sid]
 
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
I read the code from document: there is a line like :

HttpSession session = JForum.getRequest().getSession();

but I found there isn't a method named getRequest() in class JForum

or how I get HttpRequest from the method named
public String authenticateUser(RequestContext request);

it is different between RequestContext and HttpRequest

I need put email,password in session for SSO
[originally posted on jforum.net by Patrick]
 
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
Hi Patrick, the reason for why it's no HTTPRequest is, that the HTTPRequest is "wrapped" in the webrequest of jforum ... to be able to modify things upon it.

You can use the RequestContext request to use getParameter to retrieve requestparameters.. or getSession - to get or set session attributes. Both should work like a charm.


Aside that, if there is no method "getRequest" in jforum, look in one of his "parents" - that's a programming paradigm .. "overwriting" and thus :-)

You can use or overwrite methods that have been declared in your super class(es)... so if method "getDiameter" has been declared in class "Circle" .. and "Ball" is having "circle" as it's superclass, it may have the method getDiameter already implemented

Anyhow, to come back to the actual issue: just use the requestcontext variable of method authenticateuser to retrieve the session (request.getSession()) ... and work with it
[originally posted on jforum.net by Sid]
 
Yeah. What he said. Totally. Wait. What? Sorry, I was looking at this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic