Reputation: 538
I'm writing a web2py app to manage events and other activities which require users's information, such as id and names for certificates, on the other side there's a drupal site that already has the registered users.
I would like the share the drupal users to my web2py app so i don't have to register users again in my app.
Upvotes: 0
Views: 153
Reputation: 2519
To authenticate against the another web server that supports basic authentication is possible using basic auth module. Just add following to your model file after auth initialization and replace a proper http address to your Drupal ...
from gluon.contrib.login_methods.basic_auth import basic_auth
auth.settings.login_methods.append(
basic_auth('https://basic.example.com'))
For details see this section from documentation: Other login methods and login forms
Upvotes: 1