Autologin via SOAP (Gallery:Embed?)

Hakuna Matata

Joined: 2007-10-22
Posts: 2
Posted: Mon, 2007-10-22 10:12

Hello,

I need to integrate autologin function for Gallery2 via SOAP. I've read all about Gallery:Embed and tryed it but I think that it is NOT something I can use for my solution. Please correct me if I am wrong.

In my single-sign-on system I do following steps for all applications:
1. pass user id of the slave application to the code piece extracted from slave application (e. g. Gallery2) and
2. let the code login user remotely, e.g.
- create session for the user (no authentication)
- create cookie if needed.

There is no page loaded for Gallery2 at this time (hence I do it within SOAP server) and I either need any visual integration for Gallery2. I need to mime the login procedure even if user is not redirected to the gallery afterwards. But if authenticated user accesses any gallery page after browsing the non-gallery-pages he has to be already logged in Gallery2.

Please tell me if Gallery:Embed is a right approach for this?

Thank you!

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2007-10-23 15:02

- GalleryEmbed doesn't expose a remote / SOAP interface. you'd need to create a wrapper / adapter script that handles all SOAP stuff and invokes GalleryEmbed:: methods for SOAP calls.
- since there is no authentication in GalleryEmbed, you'd need to ensure that your SOAP script is only accessible internally and not from the www. or you need to add authentication.
- use GalleryEmbed::login(). it will create a session and send HTTP cookie headers.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
Hakuna Matata

Joined: 2007-10-22
Posts: 2
Posted: Thu, 2007-10-25 15:20

Thank you for qualified support, especially for your tip regarding accessibility. It's something I was not aware of. I managed to establish session and cookies via SOAP so far, but my script is indeed accessible externally :) I'm working on it now.