Simple Password Extension
Clone this wiki locally
simple_password is an extension that is used for authenticating access to a single page with a HTTP Basic password.
The main items in this write-up are based on the README that comes with the extension with explanations and screen shots added.
./script/extension install simple_password
(If this fails see the manual installation instructions)
Then restart your application server.
Once this is done, you are ready to use the extension.
This extension adds a page type called ‘Simple Password’ to your Radiant install. Using the extension is really simple.
- Create a new page that you would like to protect.
- Insert your content as you would normally do, but set the Page Type as ‘Simple Password’.
- The authentication details for this page need to be supplied in a page part called ‘config’. Create a new page part by clicking on the [+] icon in the page parts area. Make sure you call it ‘config’.
- Click on the ‘config’ page part and enter the details as below. Note that this is YAML code.
- Finally, click on ‘Save’ and you’ll be taken back to the page list. You will see that pages protected by simple password show that in the title of the page in the list of pages.
- That’s all there is to it! When you go to the protected page, your browser will prompt you for the user name and password.
- This extension password protects the page itself, not attachments linked to the page. If the attachments are in the public directory, they will still be accessible using the direct URL.
- You will need to quote strings with ambiguous meaning in YAML including (not limited) to: “!abc”, “foo:bar”, “null”, “true”, “false”, “yes”, “no”, “on”, “off” (see http://yaml.org/spec/1.2/#id2588633 and http://en.wikipedia.org/wiki/YAML#Pitfalls_and_implementation_defects)
- SimplePasswordExtension depends on the authenticate_with_http_basic and request_http_basic_authentication methods, introduced with Rails 2, and Radiant > 0.6.5.