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

Upgrade league/oauth2-server to 7.x #58

Merged
merged 1 commit into from
Nov 19, 2018
Merged

Upgrade league/oauth2-server to 7.x #58

merged 1 commit into from
Nov 19, 2018

Conversation

sunspikes
Copy link
Contributor

Unfortunately the thephpleague/oauth2-server used by this library is does not work well with swoole server because its stateful. You can see data persisting between requests, in our case an access and refresh token get injected on the first successful password authentication and after that the same swoole worker serves a successful client credentials authentication and the response contains the refresh token on the first password authentication.

This is now fixed in 7.3.0 (thephpleague/oauth2-server#960) unfortunately zend-expressive-authentication-oauth2 used 6.x. It would be awesome if we can switch the dependancy to 7.x which in fact is fairly simple, because there is only a small BC break and it is addressed by this PR

  • Are you fixing a bug?

    • Detail how the bug is invoked currently.
    • Detail the original, incorrect behavior.
    • Detail the new, expected behavior.
    • Base your feature on the master branch, and submit against that branch.
    • Add a regression test that demonstrates the bug, and proves the fix.
    • Add a CHANGELOG.md entry for the fix.
  • Are you creating a new feature?

    • Why is the new feature needed? What purpose does it serve?
    • How will users use the new feature?
    • Base your feature on the develop branch, and submit against that branch.
    • Add only one feature per pull request; split multiple features over multiple pull requests
    • Add tests for the new feature.
    • Add documentation for the new feature.
    • Add a CHANGELOG.md entry for the new feature.
  • Is this related to quality assurance?

  • Is this related to documentation?

@ezimuel ezimuel merged commit c3444f1 into zendframework:master Nov 19, 2018
@ezimuel
Copy link
Contributor

ezimuel commented Nov 19, 2018

@sunspikes Thanks for this PR, I'll release a new version very soon!

@ezimuel
Copy link
Contributor

ezimuel commented Nov 19, 2018

@sunspikes I'm changing composer.json to use:

"league/oauth2-server": "^7.3.0",

since the support of stateless has been merged in 7.3.0.

@sunspikes
Copy link
Contributor Author

@ezimuel Sure, thank you!

@Sephster
Copy link

This addition did inadvertently introduce a breaking change for some implementations. To fix this, I had to revert some of the stateless implementation. A side affect of this is that keys will be set on the response type for every request. It is a minor inconvenience but removes the BC while keeping the server stateless for Swoole. This fix should be removed in version 8. See here for further information. Apologies for any inconvenience caused!

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.

4 participants