| 1 | = BookmarksProject: Authentication = |
| 2 | |
| 3 | You can configure authentication for all non-GET requests by adding the following to your `server.yml` config file: |
| 4 | {{{ |
| 5 | auth: 1 |
| 6 | htdigest: /path/to/htdigest/file |
| 7 | # default realm is "Bookmarks"; uncomment and change if you want to use something different |
| 8 | #realm: Bookmarks |
| 9 | digest_key: secret |
| 10 | }}} |
| 11 | |
| 12 | Replace the `digest_key` "secret" with an appropriately random string. This is the secret that is used to generate the digest nonce; see [perldoc:Plack::Middleware::Auth::Digest] for more info. |
| 13 | |
| 14 | The `htdigest` file can be created using the `htdigest` utility: |
| 15 | |
| 16 | {{{ |
| 17 | $ htdigest -c /path/to/htdigest/file Bookmarks user |
| 18 | }}} |
| 19 | |
| 20 | 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 [https://httpd.apache.org/docs/2.2/programs/htdigest.html Apache docs] for more info. |