-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A new IdentityInterface for authentication #2
Comments
@ezimuel Is there still work to do on this patch? Originally posted by @weierophinney at zendframework/zend-expressive-authentication#39 (comment) |
sorry for the super late response - LGTM 👍 Originally posted by @marc-mabe at zendframework/zend-expressive-authentication#39 (comment) |
@weierophinney this PR is ready, of course we need to implement a new Originally posted by @ezimuel at zendframework/zend-expressive-authentication#39 (comment) |
I've got this and the related one for oauth2 on my todo list - not sure if I'll have time to evaluate them this week, or if it will be early next. I'll drop a note with what route I go (new minor or new major) when I do. Originally posted by @weierophinney at zendframework/zend-expressive-authentication#39 (comment) |
This PR is a work in progress to solve the issue about OAuth2 client authentication reported in zendframework/zend-expressive-authentication-oauth2#55. The idea is to use a general
IdentityInterface
as follows:And a specific
UserInterface
that extends theIdentityInterface
, as follows:Regarding the
AuthenticationMiddleware
, this PR generates aUserInterface
PSR-7 attribute ifauthenticate($request)
returns an instance ofUserInterface
. Otherwise, it will returns aIdentityInterface
attribute.These changes should prevent BC breaks for existing implementations using
zend-expressive-authentication
and offers a new solution tozend-expressive-authentication-oauth2
for implementing aClientInterface
(extendingIdentityInterface
).Originally posted by @ezimuel at zendframework/zend-expressive-authentication#39
The text was updated successfully, but these errors were encountered: