• 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

about net.jforum.sso.CookieUserSSO

 
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, guys

when I read the document about how to integrate JForum SSO, from this document ,it refere to a
net.jforum.sso.CookieUserSSO as default sso. Actually, I cann't find this class from source which i download in src.2.1.8? :x

thanks.
[originally posted on jforum.net by tidysea]
 
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
CookieUserSSO is just as an example, but it isnt integrated I think. There's a simple SSO file however in that folder (starting with 'R' i think) that shows the basic functionality. It only checks if the "user" object is filled in the request I think.

Dont have the code in front of me right now though, so pardon my guesses.

It's really easy though to write your own implementation.

And though cookie based auth is suggested, I think that URL authentication is almost a bit better, along with timestamp and cipher. It allows to pass a various amount of parameters, secured.

Feel free to search the forum too for SSO. It should return plenty of posts, some with examples on implementation, some with hints and thus.
[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
thanks to sid.

I use cokieSSo like this, but it appear no use.

first:

I write a testsso.jsp like this:
<% <br /> Cookie[] cookie1 = request.getCookies();
String acegiUserName = "hecong";
if(cookie1==null)
{
Cookie cookie = new Cookie("bbsUser", acegiUserName);
cookie.setMaxAge(-1); //???cookie???,???Cookie?
cookie.setPath("/");
response.addCookie(cookie);
}
else
{
for(int i=0; i< cookie1.length; i++)
{
String name = cookie1[i].getName();
String value = cookie1[i].getValue();
if(!name.equals("bbsUser"))
{
Cookie cookie = new Cookie("bbsUser", acegiUserName);
cookie.setMaxAge(-1);
cookie.setPath("/");
response.addCookie(cookie);
}
}
}
%>

I write a BISSO like this:
public class BISSO implements SSO{

public String authenticateUser(RequestContext request)
{
String username = null;
Cookie[] cookie = request.getCookies();
if(cookie == null)
{
//username = "guest";
}
else
{
for(int i=0; i< cookie.length; i++)
{
String name = cookie[i].getName();
String value = cookie[i].getValue();

if(name.equals("bbsUser"))
{
username = value;
break; }
}
}
System.out.println("coming to bisso"+username);
return username;
}

public boolean isSessionValid(UserSession userSession,RequestContext request)
{
System.out.println("coming to bisso session");

return false;
}
}

I update a config file
SystemGlobals.properties

sso.default.password = hecong
sso.implementation = net.jforum.sso.BISSO
authentication.type = sso

then i put the testsson.jsp to the server with jforum, and call it from explorer, but it appears nothing.
from my views, it will go to jforum directly.

is this my three steps has some wrong or other, if anyone who have implement your cokie sso,tell me please ,thanks a lot.

tidysea
[originally posted on jforum.net by tidysea]
 
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
CookieUserSSO does not exist in the latest source. If it isn't there, it would be nice if the documentation said something like "This is just an example implementation. CookieUserSSO doesn't exist in the source or packaged .war file"
[originally posted on jforum.net by dwwood]
 
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
Aggreed. Documentation updated: http://www.jforum.net/doc/SSOCookies

Rafael
[originally posted on jforum.net by Rafael Steil]
 
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
Thanks!
[originally posted on jforum.net by dwwood]
reply
    Bookmark Topic Watch Topic
  • New Topic