Upgrade Your Drupal Skills

We trained 1,000+ Drupal Developers over the last decade.

See Advanced Courses NAH, I know Enough

Locker module: Drupal authentication tool

Parent Feed: 

Locker module is a Drupal authentication tool originally developed by our team. It uses sessions to forbid access to visitors and to hide a Drupal website. A user is required to login to gain access to the website. While Locker module isn’t a replacement for Drupal authentication, it serves as an additional layer to hide your Drupal website from public. It’s an alternative to HTTP Auth standard and recommended to be used in case your server doesn’t support HTTP Auth or if you don’t have permission to set it up or in case you want additional features that Locker module provides.

Drupal authentication use cases

There are multiple cases when you could use Locker:

  • An alternative to HTTP Auth
    Use Locker in case your server doesn’t support HTTP Auth or you don’t have permission to set it up.
  • Drupal maintenance mode replacement
    Use Locker instead of using Drupal maintenance mode.
  • Hiding a Drupal site from public on development and staging server
    Take proactive measures to keep your dev and staging sites from showing up to public and in Google search results.
  • White label development
    Customise Locker with your own brand, logo and identity.
  • Hiding a site from Google Analytics
    Use Locker to hide your Drupal site from Google Analytics.
  • Post-update site verification as an anonymous user
    Verify whether cache works correctly after an update.

How to use Locker module

After installing, access Locker module in admin/config/development/locker.

To lock your Drupal site:

  • Choose radio button "Yes"
  • Choose login option
  • Click "Submit"

WARNING: This will lock your Drupal site immediately! Use your credentials to gain access. If you forget your credentials you need to use drush unlock. Files will still be accessible via direct links!

To unlock your Drupal site:

  • Choose radio button "No"
  • Click "Submit"

Drupal authentication tool unlock optionsDrupal authentication tool unlock options

Drupal authentication tool sign in to unlockDrupal authentication tool locked


Visit the official Locker module project page - https://www.drupal.org/project/locker

Author: 
Original Post: 

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web