SimpleSAML PHP Auth

The SimpleSAML PHP Auth module integrates the simplesamlphp library into Drupal.

For a full description of the module, visit:


Installation instructions can be found on the module page at:


Recommended releases:

How TFA module works

This page describes how the Two-Factor Authentication module (TFA) version 2.x module works within Drupal to provide 2FA options for authenticating with Drupal sites.

For more specific details it is recommended that you read the TFA source code.

At a high-level, TFA module does the following 3 things:

Basic Auth

The Basic Auth module takes a username and password out of the request and authenticates them against Drupal.

It implements the HTTP Basic protocol, in which the username and password are encoded and added to the Authorization header within the request. You can find further details about how it works at its section in Wikipedia.

Bash script example for custom services action with session authentication

Here is Bash script example how to work with custom services action that requires session authentication.

Endpoint requirements :

  • Set "Authentication" as "Session authentication"
  • Set "Request parsing" to "application/x-www-form-urlencoded"

Creating a REST Server with 2-Legged OAuth Authentication (Example with Java Servlet)

Apparently the way to get content from a Drupal site to another site/application is to use services. And also it would seem that using session based authentication is sooo last Drupal 6. So the recommended, yet not at all properly documented (like, anywhere), method is for an application to use 2-Legged OAuth authentication to authenticate and exchange data.

I spent some time getting angry at Drupal and OAuth and module makers and everyone who wouldn't provide a clear guide how to do this, and so now I have what I believe is a correctly working implementation (if it's not, please tell me where I'm wrong) I pass this information on to you dear reader.


Subscribe with RSS Subscribe to RSS - authentication