Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Integrating LetoDMS with another app
#1
I'd like to integrate LetoDMS with an application I'm building using Xataface. Xataface has its own user table, and I'd like to link the Xataface table with LetDMS's user table, and not require a user to login again when moving from the Xataface part to a LetDMS page.

So I guess I have two questions:
1. How can I link the user data between the two apps so that each user is only created once?
2. What do I need to do so that when a user logs in to Xataface they are effectively logged in to LetoDMS - and the reverse when they log out?

(Xataface is PHP based and uses a MySQL database)

Apologies if this is a silly question, but I'm a noob to LetoDMS

Thanks for your help

Kevin
Reply
#2
(07-05-2012, 01:25 AM)kevin.ayton Wrote: I'd like to integrate LetoDMS with an application I'm building using Xataface. Xataface has its own user table, and I'd like to link the Xataface table with LetDMS's user table, and not require a user to login again when moving from the Xataface part to a LetDMS page.

So I guess I have two questions:
1. How can I link the user data between the two apps so that each user is only created once?
2. What do I need to do so that when a user logs in to Xataface they are effectively logged in to LetoDMS - and the reverse when they log out?

(Xataface is PHP based and uses a MySQL database)

Apologies if this is a silly question, but I'm a noob to LetoDMS

This isn't silly at all and raises some basic questions when using a single authentication method. But first of all you have to distinguish between authentication and managing the user data. Xataface will most likely, just as letodms, store some data about the users and some of it is evident for the proper operation of one app and has no meaning for the other app. So you have to make sure each user exists in each app.
There are many ways to do that and the best way pretty much depends
on how familiar you are with letodms or Xataface and if you are capable to extend on of them. If Xataface has already some mechanism to use external user data, then go for it. If not, it might be an option to extend letodms. The user management is encapsulated in one class. You could also write a script that manages users in letodms and Xataface.

The authentication of letodms is completely done in op/op.Login.php. The result of a successfull authentication is just a cookie that holds the id of the current session. If there is any change to get into the authentication of Xataface, then you could create the session and set the cookie (assuming both letodms and Xataface run on the same server).

There are possibly other ways like oauth, but that needs at least implementation work on the letodms side.

Uwe
Reply
#3
(07-05-2012, 09:08 PM)steinm Wrote:
(07-05-2012, 01:25 AM)kevin.ayton Wrote: I'd like to integrate LetoDMS with an application I'm building using Xataface. Xataface has its own user table, and I'd like to link the Xataface table with LetDMS's user table, and not require a user to login again when moving from the Xataface part to a LetDMS page.

So I guess I have two questions:
1. How can I link the user data between the two apps so that each user is only created once?
2. What do I need to do so that when a user logs in to Xataface they are effectively logged in to LetoDMS - and the reverse when they log out?

(Xataface is PHP based and uses a MySQL database)

Apologies if this is a silly question, but I'm a noob to LetoDMS

This isn't silly at all and raises some basic questions when using a single authentication method. But first of all you have to distinguish between authentication and managing the user data. Xataface will most likely, just as letodms, store some data about the users and some of it is evident for the proper operation of one app and has no meaning for the other app. So you have to make sure each user exists in each app.
There are many ways to do that and the best way pretty much depends
on how familiar you are with letodms or Xataface and if you are capable to extend on of them. If Xataface has already some mechanism to use external user data, then go for it. If not, it might be an option to extend letodms. The user management is encapsulated in one class. You could also write a script that manages users in letodms and Xataface.

The authentication of letodms is completely done in op/op.Login.php. The result of a successfull authentication is just a cookie that holds the id of the current session. If there is any change to get into the authentication of Xataface, then you could create the session and set the cookie (assuming both letodms and Xataface run on the same server).

There are possibly other ways like oauth, but that needs at least implementation work on the letodms side.

Uwe

Uwe - thanks for the info - it was pretty much what I was expecting! I'll go away and have a think for a while and see what works out.

Kevin
Reply
#4
Hi Uwe

I had a similar need to integrate with LetoDMS with BugZilla and wanted to also create users/folders/groups etc. Your answer in this post http://forums.letodms.com/showthread.php?tid=643 is how I am proceeding.

I was breaking my head on how to keep the passwords between these two systems in sync. Your idea above helped me so much that I integrated in 10 mins Smile

A/c is created with a random password in LetoDMS. I changed op.Login.php to not check for md5 password but instead call the Bugzilla login webservice. On success I allowed the login. In settings I also disabled change and forgot password. Problem solved!

Thanks
Srini
Reply


Forum Jump:


Users browsing this thread: