pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.component.core.accesscontrol.sso
Class CookieBasedSSO

java.lang.Object
  extended by org.torweg.pulse.component.core.accesscontrol.sso.CookieBasedSSO
All Implemented Interfaces:
ISingleSignOnTask, Configurable<CookieBasedSSOConfig>

public class CookieBasedSSO
extends java.lang.Object
implements ISingleSignOnTask, Configurable<CookieBasedSSOConfig>

a single sign-on task which provides a session cookie with a token that allows database lookups on the user which is signed in.

Both the path and the domain of the cookie can be configured.

The table for storing the single sign-on information is expected to have to following definition:

token VARCHAR(255)
PRIMARY KEY NOT NULL
username VARCHAR(255) password VARCHAR(255) email VARCHAR(255) created BIGINT(20)
For MySQLTM this is:
CREATE TABLE x_singlesignon (token VARCHAR(255) PRIMARY KEY NOT NULL, username VARCHAR(255), password VARCHAR(255), email VARCHAR(255), created BIGINT(20));

Version:
$Revision: 1914 $
Author:
Thomas Weber

Constructor Summary
CookieBasedSSO()
           
 
Method Summary
 void initialize(CookieBasedSSOConfig cfg)
          initialises the task.
 void signOff(User user, ServiceRequest request)
          is called upon a successful log off from pulse.
 void signOn(User user, java.lang.String passwd, ServiceRequest request)
          is called upon a successful log in to pulse.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CookieBasedSSO

public CookieBasedSSO()
Method Detail

signOff

public final void signOff(User user, ServiceRequest request)
Description copied from interface: ISingleSignOnTask
is called upon a successful log off from pulse.

Specified by:
signOff in interface ISingleSignOnTask
Parameters:
user - the user to be signed off
request - the current request

signOn

public final void signOn(User user,
                         java.lang.String passwd, ServiceRequest request)
Description copied from interface: ISingleSignOnTask
is called upon a successful log in to pulse.

Specified by:
signOn in interface ISingleSignOnTask
Parameters:
user - the user to be signed on
passwd - the clear-text password
request - the current request

initialize

public void initialize(CookieBasedSSOConfig cfg)
initialises the task.

Specified by:
initialize in interface Configurable<CookieBasedSSOConfig>
Parameters:
cfg - the configuration