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

Try to use AuthenticationServiceInterface for the Identity plugin #9

Merged
merged 2 commits into from
Apr 30, 2018
Merged

Try to use AuthenticationServiceInterface for the Identity plugin #9

merged 2 commits into from
Apr 30, 2018

Conversation

gszy
Copy link
Contributor

@gszy gszy commented Sep 22, 2017

Currently, IdentityFactory asks the ServiceManager to find AuthenticationService (the class). It may be useful to also try to find service named AuthenticationServiceInterface if the previous one was not found, especially since projects may prefer to typehint to interface rather than to class. Finally, AuthenticationServiceInterface defines both methods used by the Identity plugin: hasIdentity and getIdentity.

gszy and others added 2 commits April 30, 2018 14:23
Currently, IdentityFactory asks the ServiceManager to find
AuthenticationService (the class). It may be useful to also try to find
service named AuthenticationServiceInterface if the previous one was not
found, especially since projects may prefer to typehint to interface
rather than to class. Finally, AuthenticationServiceInterface defines
both methods used by the Identity plugin: hasIdentity and getIdentity.
In particular, a test for the scenario described in #9, but also all
other behaviors.
@weierophinney weierophinney changed the base branch from master to develop April 30, 2018 19:31
@weierophinney weierophinney merged commit 10072c8 into zendframework:develop Apr 30, 2018
weierophinney added a commit that referenced this pull request Apr 30, 2018
@weierophinney
Copy link
Member

Thanks, @gscscnd!

@gszy gszy deleted the lookup-authenticationserviceinterface branch May 1, 2018 07:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants