All notable changes to this project will be documented in this file, in reverse chronological order by release.
- Nothing.
- Nothing.
- Nothing.
- Nothing.
- Nothing.
-
#41 allows users to provide an application-specific PDO service name to use with the
PdoDatabase
user repository implementation, instead of connection parameters. This allows re-use of an existing PDO connection. To configure it:return [ 'authentication' => [ 'pdo' => [ 'service' => 'name-of-existing-PDO-service', 'table' => 'name-of-table-to-use', 'field' => [ 'identity' => 'name-of-field-containing-identity', 'password' => 'name-of-field-containing-password-hash', ], ], ], ];
- Nothing.
- Nothing.
- Nothing.
- Nothing.
- #43 adds support for PHP 7.3.
- Nothing.
- Nothing.
- Nothing.
- #40 corrects the name of a configuration parameter name referenced when
raising an exception while invoking
Zend\Expressive\Authentication\UserRepositoryPdoDatabaseFactory
.
- Nothing.
- Nothing.
- Nothing.
- Nothing.
- #37 handles null values when verifying password in
PdoDatabase
- Nothing.
- Nothing.
- Nothing.
- Nothing.
-
#28 adds the final class
DefaultUser
, which provides an immutable version ofUserInterface
that can be used in most situations. -
#28 adds the service factory
DefaultUserFactory
, which returns a PHPcallable
capable of producing aDefaultUser
instance from the provided$identity
,$roles
, and$details
arguments.
-
#28 updates the
PdoDatabase
user repository to accept an additional configuration item,sql_get_details
. This value should be a SQL statement that may be used to retrieve additional user details to provide in theUserInterface
instance returned by the repository on successful authentication. -
#28 updates
UserRepositoryInterface
to remove the methodgetRolesFromUser()
; this method is not needed, asUserInterface
already provides access to user roles. -
#28 modifies each of the
Htpasswd
andPdoDatabase
user repository implementations to accept a new constructor argument, a callable$userFactory
. This factory should implement the following signature:function (string $identity, array $roles = [], array $details = []) : UserInterface
This factory will be called by the repository in order to produce a
UserInterface
instance on successful authentication. You may provide the factory via the serviceZend\Expressive\Authentication\UserInterface
if you wish to use one other than the one returned by the providedDefaultUserFactory
class. -
#28 modifies
UserInterface
as follows:- Renames
getUserRoles()
togetRoles()
- Adds
getDetail(string $name, mixed $default)
- Adds
getDetails() : array
- Renames
- Nothing.
- #28 removes
UserTrait
in favor of theDefaultUser
implementation.
- Nothing.
- #15 adds support for PSR-15.
- Nothing.
- Nothing.
-
#15 and #3 remove support for http-interop/http-middleware and http-interop/http-server-middleware.
-
#19 removes
Zend\Expressive\Authentication\ResponsePrototypeTrait
; the approach was flawed, and the various adapters will be updated to compose response factories instead of instances.
- #18
uses the
ResponseInterface
as a factory. This was recently changed in zend-expressive#561.
- Nothing.
- #22
updates the
ResponsePrototypeTrait
to allow callableResponseInterface
services (instead of those directly returning aResponseInterface
).
- Nothing.
- Nothing.
- Nothing.
- Nothing.
- #14
renames the method
UserInterface::getUsername()
toUserInterface::getIdentity()
.
- Nothing.
- Nothing.
- #13
fixes an issue whereby fetching a record by an unknown username resulted in a
"Trying to get property of non-object" error when using the
PdoDatabase
user repository implementation.
- Nothing.
-
#4 renames the method
UserInterface::getUserRole()
toUserInterface::getUserRoles()
. The method MUST return an array of string role names. -
#4 renames the method
UserRepositoryInterface::getRoleFromUser()
toUserRepositoryInterface::getRolesFromUser()
. The method MUST return an array of string role names.
- Nothing.
- Nothing.
- Nothing.
Initial release.
- Everything.
- Nothing.
- Nothing.
- Nothing.
- Nothing.