72758

Drupal External Authentication

Question:

I have a cURL PHP script which is able to validate a username/password against the external source.

What is the best way to integrate this as a login requirement for (select) users in Drupal?

Answer1:

To start with, you could look at the code of the OpenID module that comes with Drupal 6 - creating a new module based on this code should get you 90% of the way. It allows existing users to associate OpenIDs with their accounts, and it sounds like you'd need to do something similar from your reply to Henrik.

Answer2:

As alternative, you can add a validation function to the form with ID user_login to verify if the additional conditions are verified. If you do this, remember to add your validation function with array_unshift(), or the user will be authenticated the same.

Recommend

  • Drupal 6: defining js and css for particular pages
  • Function to check if jquery plugins are already initialized
  • PHP cURL timeout ignored
  • Fetching statements from Learning Locker LRS using TinCan API
  • Ignore “The” when sorting a View in Drupal
  • Wordpress and Drupal SSO/Single Sign On
  • DotNetOpenAuth - how to uniquely identify Google users?
  • Google OAuth2 for an web application hosted behind NAT (intranet server without public IP)
  • apply a javascript function to draggable copy
  • Android changing fragment order inside FragmentPagerAdapter
  • Sequential (transactional) API calls in angular 4 with state management
  • Create DicomImage from scratch using Dcmtk
  • Groovy: Unexpected token “:”
  • How do I exclude a dependency in provided scope when running in Maven test scope?
  • Is there a perl module to validate passwords stored in “{crypt}hashedpassword” “{ssha}hashedpassword
  • Use of this Javascript
  • Meteor helpers not available in Angular template
  • C++ Partial template specialization - design simplification
  • Initializer list vs. initialization method
  • Control modification in presentation layer
  • Sails.js/waterline: Executing waterline queries in toJSON function of a model?
  • Fetching methods from BroadcastReceiver to update UI
  • How to make a tree having multiple type of nodes and each node can have multiple child nodes in java
  • Cassandra Data Model
  • ORA-29908: missing primary invocation for ancillary operator
  • How to get next/previous record number?
  • using conditional logic : check if record exists; if it does, update it, if not, create it
  • Python: how to group similar lists together in a list of lists?
  • Codeigniter doesn't let me update entry, because some fields must be unique
  • python regex in pyparsing
  • Acquiring multiple attributes from .xml file in c#
  • using HTMLImports.whenReady not working in chrome
  • How do you join a server to an Active Directory (domain)?
  • How to CLICK on IE download dialog box i.e.(Open, Save, Save As…)
  • Android Google Maps API OnLocationChanged only called once
  • How does Linux kernel interrupt the application?
  • How can I remove ASP.NET Designer.cs files?
  • How to get NHibernate ISession to cache entity not retrieved by primary key
  • java string with new operator and a literal
  • How can I use threading to 'tick' a timer to be accessed by other threads?