Updated: Comment #N

Problem/Motivation

After enabling the module it is not clear at all how to use it.

This is not helping for ie #2103035: Review/update hook_help() for the basic_auth module either.

I learned router_test.module has this setting in its routing

  options:
    _auth: [ 'basic_auth' ]

But I expected the ability to provide Basic Auth site wide after enabling the module.

Proposed resolution

  • Add more documentation?
  • Add configuration options?

Remaining tasks

User interface changes

API changes

Comments

klausi’s picture

This is a web service module and not meant for human users, hence it is in the web service module package.

The primary use case in core is REST module right now, see the documentation: https://drupal.org/node/2098511
The module works independent of REST module (it is merely an authentication provider) and could be used for other web service modules as well.

So we should improve hook_help() for this module, where we already have an issue for.

What would you like to configure?

A doc page might be a good idea that elaborates more on the use case of this module.

clemens.tolboom’s picture

Thanks for the quick reply.

As the name for the module sounds familiar to people they probably think they can password protect their site with it. Same as I did through http://build2be.com/content/temporary-securing-drupal-through-basic-auth...

So apart from better XREF for the module my question is:

- Can we use basic auth for password protect a Drupal 8 site?

If not why not?
If yet how?

I understand it's need for REST.

klausi’s picture

This module is just an authentication system against the user table, similar to the user login form. You are talking about an authorization system where you protect the whole site or certain pages with an extra password that is not related to Drupal user accounts at all.

If just want to password-protect a Drupal site you can do that the same way as you did in Drupal 7 or on the web server level or with a different Drupal module for that purpose.

clemens.tolboom’s picture

Status: Active » Closed (works as designed)

@klausi thanks :) ... I feel a little stupid but 'just blame the documentation' for now. I'll keep watching #2103035: Review/update hook_help() for the basic_auth module and the documentation.