wiki:BookmarksProject/Authentication

Version 1 (modified by peter, 8 years ago) (diff)

documented the authentication setup as of [114/bookmarks]

Bookmarks Project: Authentication

You can configure authentication for all non-GET requests by adding the following to your server.yml config file:

auth: 1
htdigest: /path/to/htdigest/file
# default realm is "Bookmarks"; uncomment and change if you want to use something different
#realm: Bookmarks
digest_key: secret

Replace the digest_key "secret" with an appropriately random string. This is the secret that is used to generate the digest nonce; see Plack::Middleware::Auth::Digest for more info.

The htdigest file can be created using the htdigest utility:

$ htdigest -c /path/to/htdigest/file Bookmarks user

The htdigest utility comes with the Apache webserver, or in the apache2-utils package if you don't have the full Apache and don't want to install it. The realm you use in the digest file must match the realm configuration setting ("Bookmarks" by default). See the Apache docs for more info.