Skip to content
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

Always set Auth interface in DI to the correct plugin's Auth implementation #13279

Merged
merged 4 commits into from Aug 17, 2018

Conversation

diosmosis
Copy link
Member

The Auth interface is used for more than authentication, such as getting the configured Login plugin's name, and it is possible for code to try and re-authenticate using the stored auth. In which case, we would always want this interface set to the real implementation.

This PR does that if the SessionAuth succeeds and sets the token auth to the authenticated user's token auth, so reauthentication w/ plugin auths should work (since all Auth implementations are required to support authenticating by token auth alone).

CC @matomo-org/core-team

@diosmosis diosmosis added not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. Regression Indicates a feature used to work in a certain way but it no longer does even though it should. labels Aug 12, 2018
@diosmosis diosmosis added this to the 3.6.0 milestone Aug 12, 2018
@diosmosis diosmosis added the Needs Review PRs that need a code review label Aug 13, 2018
@mattab mattab merged commit a7216ad into 3.x-dev Aug 17, 2018
@diosmosis diosmosis deleted the auth-regression branch August 19, 2018 22:51
InfinityVoid pushed a commit to InfinityVoid/matomo that referenced this pull request Oct 11, 2018
…tation (matomo-org#13279)

* Make sure Auth interface is always set even if session auth succeeds.

* Add failing test.

* Fix FrontControllerTest

* Put hash token authentication back since it is still in use in plugins.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. Regression Indicates a feature used to work in a certain way but it no longer does even though it should.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants