Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit 331500a

Browse files
authored
added realm to htpasswd configuration, added bcrypt hint
The realm is required to prevent an InvalidConfigException in BasicAccessFactory from zendframework/zend-expressive-authentication-basic. Since it's checked and RFC 2617 says "The realm attribute (case-insensitive) is required for all authentication schemes which issue a challenge.", it should be save to add it to the docs. Also the .htpasswd file must use bcrypt hash algorithm, otherwise a RuntimeException is thrown.
1 parent 82b9572 commit 331500a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/book/v1/user-repository.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,12 @@ for more information on config providers.
5252
## htpasswd configuration
5353

5454
When using the htpasswd user repository implementation, you need only configure
55-
the path to the `htpasswd` file:
55+
the path to the `htpasswd` file and a `realm`. The `htpasswd` file must use bcrypt hash algorithm:
5656

5757
```php
5858
return [
5959
'authentication' => [
60+
'realm' => 'insert realm value',
6061
'htpasswd' => 'insert the path to htpasswd file',
6162
],
6263
];

0 commit comments

Comments
 (0)