Releases: portier/portier-php
Releases · portier/portier-php
v0.6.0
-
BREAKING: This PR reverts the API change made to the
verify
method in v0.5.0:-public function verify(string $token): VerifyResult +public function verify(string $token): string
v0.5.0 mistakenly assumed
state
was part of the token, but it is simply returned in a query parameterstate
to the callback / redirect URI. As such, your application can extract it directly from the request.
v0.5.0
-
Now supports
lcobucci/jwt
v5 in addition to v4. -
Now supports
lcobucci/clock
v3 in addition to v2. -
The
authenticate
method now takes an optional second argument$state
, which is returned byverify
in your callback:-public function authenticate(string $email): string +public function authenticate(string $email, string $state = null): string
-
BREAKING: The
verify
method now returns an object, so that it can also return the original$state
from the call toauthenticate
:-public function verify(string $token): string +public function verify(string $token): VerifyResult
v0.4.2
v0.4.1
Changes
- The
Client::leeway
property is now properly applied when validating tokens. This was previously not the case, resulting in zero leeway. - The
authorization_endpoint
from the discovery document is now properly applied, instead of hardcoding the/auth
broker route. This meansClient::authenticate()
now does an external HTTP request, but caching should not change the overall amount of requests made by the client.
v0.4.0
Breaking changes
- This version requires PHP 7.4 or 8.0.
Client::normalize()
now takes a singlestring
email address, instead of an array. This is because recent PHP versions have all the functionality required to do normalization locally, and we no longer have to fall back to calling the Portier broker HTTP API. The fallback code has been removed, as well asnormalizeLocal
andhasNormalizeLocal
.- Function return types have been added to
StoreInterface
andAbstractStore
. Custom store implementations may have to be adjusted to match, but this should not require any change in the implementation.
Other changes
- All library dependencies have been upgraded