You are not logged in.
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
ok. more digging. discovered that hitAppoint uses a session object to determine if someone is logged in or not:
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