urlaube / password-protection

password protection plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Password-Protection plugin

The Password-Protection plugin is a plugin for Urlaub.be that allows you to protect individual content files with a password.

Installation

Place the folder containing the plugin into your plugins directory located at ./user/plugins/.

Configuration

At the moment this plugin has no configuration.

Usage

To protect a content file with a password you have to add a Password: header to the content file. This header can contain one or more passwords that are separated by a whitespace character. You can either provide plaintext passwords or hashed passwords as supported by the password_verify function of PHP.

A hashed password can e.g. be prepared like this:

$ php -r "print(PHP_EOL.password_hash(readline('Password: '), PASSWORD_BCRYPT, ['cost' => 12]).PHP_EOL);"

By default the content is replaced by a password submission form. The content will only be displayed when a correct password is provided through the password submission form.

About

password protection plugin

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:PHP 88.1%Language:CSS 11.9%