I have a custom web app, completely unrelated to Drupal, that I want to integrate with Drupal because:

1: I want to use Drupal as the portal for the site so that I can do basic CMS stuff - such as post updates about the web app
2: . . . and provide jumping off points to the app
3: . . . and integrate with a wiki
4: . . . and integrate with phpbb (I see the module(s) for that)

What I really want to know is, when I authenticate to my Drupal site and then jump off to my web app - what tools are there or what background bits do I need to look at so that I can identify the user who came in?

Point being:

1: User comes to my Drupal site
2: User logs into site.
3: User sees interesting updates
4: User clicks on link to jump to web application

Is the session stored somewhere in a cookie? Can I just harvest that cookie in my app? I'm looking at the cookies loaded in Chrome and it doesn't seem very intuitive if so.

Are there session variables such as "USER='bob'" or something similarly interesting
And if so, what prevents a user from just spoofing that?

I need to make sure when they get into the web app they aren't pretending to be someone else.

If you can point me in the right direction, I'd appreciate it.

Thanks!

Comments

Ullapool’s picture

For what it's worth, my question is a similar question as was asked back in 2006 in this post.

The reply was to use CakePHP and Drake - the Drupal project which has been abandoned for years. Perhaps that's because there are solutions out there that my friends here will tell me about! :)

mradcliffe’s picture

Can you build your web application within Drupal itself (Drupal module development)? Then you do not need to worry about going off-site or to some custom php script.

Or if it's already, built, then it might be worth investigating doing this.

You can use Services to make web services requests back to your Drupal site. You could setup oauth and do a basic oauth integration separately from Services.

fyl’s picture

I have a need for this capability as well. My application is not in PHP (it's in Python) so making it a Drupal module is not an option. I have read a few other posts which suggest some possibilities but it would seem like this is something which should be clean rather than a hack. I can see many cases where this makes sense.