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

Commit 84c1079

Browse files
committed
Adds CHANGELOG entries for #28 to new 0.5.0 release
1 parent 7b00909 commit 84c1079

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

CHANGELOG.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,59 @@
22

33
All notable changes to this project will be documented in this file, in reverse chronological order by release.
44

5+
## 0.5.0 - 2018-05-23
6+
7+
### Added
8+
9+
- [#28](https://github.com/zendframework/zend-expressive-authentication/pull/28) adds the final class `DefaultUser`, which provides an immutable version of `UserInterface`
10+
that can be used in most situations.
11+
12+
- [#28](https://github.com/zendframework/zend-expressive-authentication/pull/28) adds the service factory `DefaultUserFactory`, which returns a PHP `callable`
13+
capable of producing a `DefaultUser` instance from the provided `$identity`,
14+
`$roles`, and `$details` arguments.
15+
16+
### Changed
17+
18+
- [#28](https://github.com/zendframework/zend-expressive-authentication/pull/28) updates the `PdoDatabase` user repository to accept an additional
19+
configuration item, `sql_get_details`. This value should be a SQL statement
20+
that may be used to retrieve additional user details to provide in the
21+
`UserInterface` instance returned by the repository on successful
22+
authentication.
23+
24+
- [#28](https://github.com/zendframework/zend-expressive-authentication/pull/28) updates `UserRepositoryInterface` to remove the method `getRolesFromUser()`;
25+
this method is not needed, as `UserInterface` already provides access to user roles.
26+
27+
- [#28](https://github.com/zendframework/zend-expressive-authentication/pull/28) modifies each of the `Htpasswd` and `PdoDatabase` user repository
28+
implementations to accept a new constructor argument, a callable
29+
`$userFactory`. This factory should implement the following signature:
30+
31+
```php
32+
function (string $identity, array $roles = [], array $details = []) : UserInterface
33+
```
34+
35+
This factory will be called by the repository in order to produce a
36+
`UserInterface` instance on successful authentication. You may provide the
37+
factory via the service `Zend\Expressive\Authentication\UserInterface` if you
38+
wish to use one other than the one returned by the provided
39+
`DefaultUserFactory` class.
40+
41+
- [#28](https://github.com/zendframework/zend-expressive-authentication/pull/28) modifies `UserInterface` as follows:
42+
- Renames `getUserRoles()` to `getRoles()`
43+
- Adds `getDetail(string $name, mixed $default)`
44+
- Adds `getDetails() : array`
45+
46+
### Deprecated
47+
48+
- Nothing.
49+
50+
### Removed
51+
52+
- [#28](https://github.com/zendframework/zend-expressive-authentication/pull/28) removes `UserTrait` in favor of the `DefaultUser` implementation.
53+
54+
### Fixed
55+
56+
- Nothing.
57+
558
## 0.4.0 - 2018-03-15
659

760
### Added

0 commit comments

Comments
 (0)