hitAppoint Online Appointment Scheduling SoftwareOnline Appointment Software

Forum

You are not logged in.

#1 2008-05-29 19:01:42

utdrmac
Member
From: Houston, TX
Registered: 2008-02-15
Posts: 11
Website

single signon

hello,
we are attempting to integrate hitAppoint within our web app. Our members are already logging in using their username and password to our members area. We don't want them to have to login "again" to the hitAppoint system.

How can I pass some data to hitAppoint, or pre-construct a session with the information so hitAppoint sees the member as already logged in?

Offline

 

#2 2008-06-02 15:51:45

utdrmac
Member
From: Houston, TX
Registered: 2008-02-15
Posts: 11
Website

Re: single signon

ok. more digging. discovered that hitAppoint uses a session object to determine if someone is logged in or not:

Code:

core/hclib/session/hcSessionCookie.php:

class hcSessionData
{
     public $data = array();
}

yep. that's it. that $data has two elements: 'userId' and 'sessionId'.  The latter is irelevant and the former is obvious. So, in our case, we have another table that stores user information and when we create a new user in our system, we simply insert new rows into the hitAppoint tables.

To solve the SSO problem, when we create a user, we simply assign the `uid` column in the hitAppt tables to be the same as our auto-increment userId column.

So now when a user logs into our system, we create that session object above with the right userId, serialize the session object and assign it to $_SESSION[SESSION_VARNAME] (that constant defaults to 'hitcodesession' inside core/base/_app_startup.php)

And voila! SSO!

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson