-
Notifications
You must be signed in to change notification settings - Fork 343
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
[WIP] [BC BREAK] Refactor of authentication layer #554
Open
adamlundrigan
wants to merge
17
commits into
ZF-Commons:master
Choose a base branch
from
adamlundrigan:feature/db-authentication-rewrite
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
a49a4a9
Update AdapterChainEvent to take identity/credential rather than request
adamlundrigan c8cd716
Simplified Authentication Storage
adamlundrigan 6845307
Rewrite the Mapper-based Authentication Adapter
adamlundrigan 64d37c3
In AdapterChainEvent, clear credential if identity is cleared
adamlundrigan 96d5200
Allow setting Mapper auth adapter storage from constructor
adamlundrigan 1b47a82
Rewrite ZfcUser\Authentication\Adapter\AdapterChain
adamlundrigan 4c6d1bd
Ensure that adapters are processed FIFO (LIFO is default for Priority…
adamlundrigan 6342b5b
Prevent returning results that are not instances of Result in Adapter…
adamlundrigan 1e2365e
Remove unused references to ModuleOptions in some factories
adamlundrigan 0440720
Update ModuleOptions to reflect new default auth adapter name
adamlundrigan e47a62d
Fix the tests
adamlundrigan 084311f
CS fixes
adamlundrigan 4153c18
Update AdapterChain to trigger relevant events
adamlundrigan 038ac7a
Add event listener which regenerates SID on authenticate if Session s…
adamlundrigan 774efa7
Remove HTML code coverage from phpunit.xml
adamlundrigan fef538d
Simplified AdapterChain by using EventManagerAwareTrait
adamlundrigan 49b53c7
Update/Add docblocks were appropriate
adamlundrigan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please expand function name, LastInFirstOut?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be Zend Framework's problem: https://github.com/zendframework/zf2/blob/master/library/Zend/Stdlib/PriorityList.php#L172
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hahahaha yeah ok :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stdlib is a bit of a mess in that regard. SplPriorityQueue and SplQueue are wrappers around the SPL classes to make them serializable. PriorityQueue uses
Zend\Stdlib\SplPriorityQueue
internally to get around SplPriorityQueue's destructive iterator, while PriorityList is an entirely standalone implementation. PriorityList with LIFO=false is functionally equivalent to PriorityQueue, just implemented differently. PriorityList with LIFO=true is technically a priority stack, but there is no PriorityStack in Stdlib. The only difference between PriorityStack and PriorityQueue is how they break priority ties. As far as I can tell it's all necessitated by odd behaviours in the Spl classes. And all of this has absolutely nothing to do with this PR, I just got off-track but I spent the time writing it so I might as well post it.I'm going to try to sub in
\SplPriorityQueue
to see if it will work for this use case. If not, I'll sub inZend\Stdlib\PriorityQueue
which is equivalent to what I have currently but will cause no future head-scratching overisLIFO(false)
.