Kayako logo
Modifications & Addon Releases Modification guides and addons are posted here to share with the community. Do not post requests in here!

Notices

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  (#1) Old
Siora Offline
Member
 
Siora's Avatar
 
Posts: 1,284
Join Date: Apr 2007
Location: Toronto Canada
External login PHP guide - 13-06-2007, 06:03 PM

Does anybody have their system setup such that they can log into the Kayako system from their home site?

I want to setup a site where users can log into my members area to gain access to tickets and other services however I want to do most of the authentication and setup external to Kayako so that it is easier to upgrade Kayako when there are new releases.

It would be ideal if on my site, the user logs in, is authenticated they are taken to a members area which is still on my site. Then if they click submit/view tickets they are taken to Kayako's site without the need to log in again.

Is this possible? If so, what login method/application do you use?


Siora Solutions Inc.
www.sioraIT.com
   
Reply With Quote
  (#2) Old
Sheep Offline
Member
 
Sheep's Avatar
 
Posts: 332
Join Date: Feb 2007
Location: Lyon, France
13-06-2007, 06:18 PM

seems like a logginshare using shared session


Antoine "Sheep" BERMON
-- I left kayako's community: do NOT contact me for job offers, thx --
   
Reply With Quote
  (#3) Old
Siora Offline
Member
 
Siora's Avatar
 
Posts: 1,284
Join Date: Apr 2007
Location: Toronto Canada
13-06-2007, 07:07 PM

Quote:
Originally Posted by Sheep View Post
seems like a logginshare using shared session
Thanks Antoine, do you have any more info on this or can lead me to some info as to where I can get this plugin or how to test. Sorry, I know this has been discussed but I need to pass on some good info to my developers so they can take a look.


Siora Solutions Inc.
www.sioraIT.com

Last edited by Siora; 13-06-2007 at 11:57 PM.
   
Reply With Quote
  (#4) Old
Sheep Offline
Member
 
Sheep's Avatar
 
Posts: 332
Join Date: Feb 2007
Location: Lyon, France
13-06-2007, 09:59 PM

I'm a bit new to supportsuite but skilled enougth with php so i think i should come up with something that works


In index.php there are the following lines:

PHP Code:
 // ======= LOAD THE USER CREDENTIALS FROM ACTIVE LOGINSHARE MODULE =======
 
loginShareLoadUser(); // Loads up user data from active loginshare module
 
$loginshare->processUserGroup(); // Checks to see of empty user groups and loads default ones
 
$loginshare->loadPermissions(); // Loads up the permissions for active user group 
the first one is the line that interests us: loginShareLoadUser();

in includes/loginshare/ every loginshare implements this method.

It's described with this comment:
PHP Code:
/**
* Load the user credentials into current workspace. The following variables should be declared for proper working:
* userid - User id that is set in the "users" table
* fullname
* email - Array
* password (MD5 Hashed)
* usergroupid - If this is not set, then it will use the default registered user group for this template group
*/
function loginShareLoadUser()

the goal there is to create a loginshare that use the session of your user on your website

PHP Code:
function loginShareLoadUser()
{
 global 
$dbCore$_SWIFT$loginshare;
 if (empty(
$_SWIFT["session"]["typeid"]))
 {
  
$_SWIFT["user"]["loggedin"] = false;
  return 
false;
 } 
at the begining of this method you can see that they're checking "is the user logged in"? if yes continue else, lets go out and say that the user is not logged in.

So i think that the code that get the session from your site should be here.
(check the cookie!)


but a problem comes up with user synchronisation
with classic loginshare when a user tries to log in it checks in "your site database" if the user exists with the same login/pass and if the user isn't already in supportsuite own database it will register him.
Why do we have to register again? that's because supportsuite will work with its own user base.

(registering "new" user is done in this function)
PHP Code:
/**
* Authorize a user based on email and password
*/
function loginShareAuthorize($username$password)

but loginShareAuthorize() is a method that is called (i think) when the user log in via the login pannel so you have to call it when loginShareLoadUser() is called (you only need to call loginShareAuthorize if no supportsuit session is on).


then an other problem...
how can we insert a user not present in supportsuite's database if we dont know his password?
The session of your site will allow you to get his login... but his password?

If you can get your password not crypted from your database that should be nice (but damn, that's bad for security!). The best case would be that your password is stored crypted in MD5 as supportsuite also use MD5 to store the password.


Hmmm
should be something like that.

It's late so i'm going to sleep , i'll check tomorow if it's understandable and usable.

I repeat it: i'm kinda new to supportsuite so if anyone knows how to do, listen to them


PS: it's antOIne and not antIOne ( OI sounds like "wah" in french: antwah'n)... bah, who cares, call me "sheep" that'll be easier


Antoine "Sheep" BERMON
-- I left kayako's community: do NOT contact me for job offers, thx --

Last edited by Sheep; 13-06-2007 at 10:06 PM.
   
Reply With Quote
  (#5) Old
Jamie Edwards Offline
Operations Manager
 
Jamie Edwards's Avatar
 
Posts: 5,025
Join Date: Jan 2006
Location: United Kingdom
13-06-2007, 10:14 PM

Sheep, this is fantastic - thanks for sharing


Jamie Edwards (jamie.edwards ]at[ kayako.com)
----------------------------------------------------------------
---
  • New to the forum? New user's guide here.
  • Submit bug reports here.
  • Submit support tickets via the members area.
  • Submit sales queries either via live chat or via e-mail.
  • There is no official ETA on Version 4.
   
Reply With Quote
  (#6) Old
Siora Offline
Member
 
Siora's Avatar
 
Posts: 1,284
Join Date: Apr 2007
Location: Toronto Canada
13-06-2007, 11:26 PM

Thanks Antoine, where do I buy x-cart loginshare?


Siora Solutions Inc.
www.sioraIT.com
   
Reply With Quote
  (#7) Old
Jamie Edwards Offline
Operations Manager
 
Jamie Edwards's Avatar
 
Posts: 5,025
Join Date: Jan 2006
Location: United Kingdom
13-06-2007, 11:39 PM

The X-Cart LoginShare is available to all X-Cart customers via the X-Cart forums.


Jamie Edwards (jamie.edwards ]at[ kayako.com)
----------------------------------------------------------------
---
  • New to the forum? New user's guide here.
  • Submit bug reports here.
  • Submit support tickets via the members area.
  • Submit sales queries either via live chat or via e-mail.
  • There is no official ETA on Version 4.
   
Reply With Quote
  (#8) Old
Siora Offline
Member
 
Siora's Avatar
 
Posts: 1,284
Join Date: Apr 2007
Location: Toronto Canada
13-06-2007, 11:46 PM

Can you please post a link? I went to x-cart.com, is this what you are referring to? What do people recommend buying gold ($200) or Pro ($500). Of course I will not buy it until Kayako works with the new version but just need to know so I can plan.


Siora Solutions Inc.
www.sioraIT.com
   
Reply With Quote
  (#9) Old
Siora Offline
Member
 
Siora's Avatar
 
Posts: 1,284
Join Date: Apr 2007
Location: Toronto Canada
14-06-2007, 12:00 AM

I plan on using Joomla. Does this have its own loginshare? I'm so confused if you can't tell already...LOL.


Siora Solutions Inc.
www.sioraIT.com
   
Reply With Quote
  (#10) Old
Sheep Offline
Member
 
Sheep's Avatar
 
Posts: 332
Join Date: Feb 2007
Location: Lyon, France
14-06-2007, 06:09 AM

There is a logginshare for joomla, x cart, phpBB and more (well... in the 3.10.02 owned version that we bought...) it's in includes/loginshare/*.

What version are you using Siora?

(Edit: maybe the one i have is outdated: take a look here: X-Cart LoginShare Module)



But be carefull even if logginshare exists for joomla, it's still a LOGIN shared and not session shared... but well ... that's a good point to start from...


Quote:
Sheep, this is fantastic - thanks for sharing
Hmmm it's just random thinkings, i'm not 100% sure that it should be done like that... so you should not call this a "guide"

I'll try to give a little try on my break.


Antoine "Sheep" BERMON
-- I left kayako's community: do NOT contact me for job offers, thx --

Last edited by Sheep; 14-06-2007 at 07:15 AM.
   
Reply With Quote
  (#11) Old
Jamie Edwards Offline
Operations Manager
 
Jamie Edwards's Avatar
 
Posts: 5,025
Join Date: Jan 2006
Location: United Kingdom
14-06-2007, 09:32 AM

Quote:
Originally Posted by Siora View Post
Can you please post a link? I went to x-cart.com, is this what you are referring to? What do people recommend buying gold ($200) or Pro ($500). Of course I will not buy it until Kayako works with the new version but just need to know so I can plan.
No, the X-Cart LoginShare module is licensed with and only with a X-Cart licence. To access the customer forums you must first become a customer.


Jamie Edwards (jamie.edwards ]at[ kayako.com)
----------------------------------------------------------------
---
  • New to the forum? New user's guide here.
  • Submit bug reports here.
  • Submit support tickets via the members area.
  • Submit sales queries either via live chat or via e-mail.
  • There is no official ETA on Version 4.
   
Reply With Quote
  (#12) Old
craigbrass Offline
Senior Member
 
Posts: 5,319
Join Date: Jun 2005
Location: Cumbria, UK
14-06-2007, 09:39 AM

Quote:
No, the X-Cart LoginShare module is licensed with and only with a X-Cart licence. To access the customer forums you must first become a customer.
And it hasn't been released yet I can confirm (as I have just checked their forums).


Craig Brass - Kayako Forum Squatter (Note: I am NOT a staff member)

Icon Headquarters - Its Elixir - Web2Messenger
   
Reply With Quote
  (#13) Old
Siora Offline
Member
 
Siora's Avatar
 
Posts: 1,284
Join Date: Apr 2007
Location: Toronto Canada
14-06-2007, 11:57 AM

Quote:
Originally Posted by Sheep View Post
There is a logginshare for joomla, x cart, phpBB and more (well... in the 3.10.02 owned version that we bought...) it's in includes/loginshare/*.

What version are you using Siora?

(Edit: maybe the one i have is outdated: take a look here: X-Cart LoginShare Module)

But be carefull even if logginshare exists for joomla, it's still a LOGIN shared and not session shared... but well ... that's a good point to start from...
I am using an owned version of Kayako 3.10.02 as well. Apparently joomla's loginshare does not provide a single sign on solution but softair was able to fix that for a member here.


Siora Solutions Inc.
www.sioraIT.com
   
Reply With Quote
  (#14) Old
Sheep Offline
Member
 
Sheep's Avatar
 
Posts: 332
Join Date: Feb 2007
Location: Lyon, France
14-06-2007, 01:52 PM

Quote:
Apparently joomla's loginshare does not provide a single sign on solution
That's what i was saying "it's still a LOGIN shared and not session shared".

I hope you'll get what you need with softair.
(note: i'm stopping my attempt to make a guide for a -sessionshare- loginshare. Wake me up again if you're stuck)


Antoine "Sheep" BERMON
-- I left kayako's community: do NOT contact me for job offers, thx --

Last edited by Sheep; 14-06-2007 at 01:59 PM.
   
Reply With Quote
  (#15) Old
Siora Offline
Member
 
Siora's Avatar
 
Posts: 1,284
Join Date: Apr 2007
Location: Toronto Canada
14-06-2007, 02:31 PM

Quote:
Originally Posted by Sheep View Post
That's what i was saying "it's still a LOGIN shared and not session shared".

I hope you'll get what you need with softair.
(note: i'm stopping my attempt to make a guide for a -sessionshare- loginshare. Wake me up again if you're stuck)
Your help is always needed and I'm sure other members here will appreciate this guide. I would say continue working on it but only if you have time, don't lose sleep over it. Your help is greatly appreciated. We do not have joomla implemented yet so I wanted to ensure proper functionality before going that route so this information will definately help. Thanks AntOIne a.k.a Sheep.


Siora Solutions Inc.
www.sioraIT.com
   
Reply With Quote
Reply

Tags
external, guide, php

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vBulletin Skin developed by: vBStyles.com


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46