Since league/oauth2-server latest version changed to v7.1.1, should we update the https://cgit.drupalcode.org/simple_oauth/tree/composer.json ?
| Comment | File | Size | Author |
|---|---|---|---|
| #19 | 2977127--interdiff--18-19.txt | 1.06 KB | e0ipso |
| #19 | 2977127--update-library--19.patch | 3.41 KB | e0ipso |
| #18 | 2977127--interdiff--16-18.txt | 22.5 KB | e0ipso |
| #18 | 2977127--update-library--18.patch | 4.47 KB | e0ipso |
| #16 | 2977127-16.patch | 24.7 KB | bradjones1 |
Comments
Comment #2
alan_blake commentedComment #3
e0ipsoThanks for the patch!
Tests are failing for the new version of the dependency, retesting just in case.
@alan_blake what is new in the new version of the library?
Comment #4
e0ipsoHmm it seems that tests are consistently failing.
Comment #5
alan_blake commented@e0ipso according to your comment https://www.drupal.org/project/simple_oauth/issues/2915576#comment-12487230 , the PR is merge to master branch on 12 Feb 2018, and the latest 6.x library commit is 24 Dec 2017 (https://github.com/thephpleague/oauth2-server/commits/6.1.1) , so @sime 's fix will not effect if we still using 6.x version.
test bot is so wired to delete consumer module. Test report says that "Unable to install modules: module 'simple_oauth' is missing its dependency module consumers." and I found the test bot install module from composer prefer dist, so will still install 6.X version library.
Comment #6
e0ipsoWe still want this. Bubbling it up.
Comment #7
bradjones1A method signature also needed updating to make this work. Otherwise, pretty straightforward.
Comment #8
e0ipsoThanks for the patch!! You are awesome.
@bradjones1 it seems that tests are not passing. Maybe there something broken with our integration upon updating to the new version?
Comment #9
gdev2018 commentedWe still want this in the release, pls
Comment #10
bradjones1Indeed...
et. al.
Not sure if the test needs updating or if this breaks something more globally.
Comment #11
bradjones1So this took quite a bit of digging and local debugging, but I believe the test failures were the proximate result of a missing
redirect_uriparameter in the auth code flow. Why this hadn't been an issue before is beyond what I explored, but I did find this note in the upstream queue relating to whether the parameter is optional (as set out in the spec) in this implementation. It's a bit old but from a read of the code in 7.1.x and this note, it appears the maintainer made the conscious choice to require it, despite the flexibility in the spec.I also ran into an issue where some requests to the test site in functional tests were made without the cookie indicating the simpletest db to use; it would then result in errors where the site was not able to properly load the previously-created client consumer record. I replaced the request method in RequestHelperTrait with a post method that adds the appropriate cookie data.
I am admittedly not very good at writing tests so hopefully this moves us in the right direction. On the bright side I don't think there's anything particular in the newer version beyond a function signature that needed changing. So this is mostly a test fix.
Comment #12
bradjones1Comment #13
bradjones1Missed a few calls but that's progress.
Comment #14
bradjones1Comment #15
bradjones1Addressing testbot failures.
Comment #16
bradjones1Comment #17
e0ipsoWhy these changes?
Comment #18
e0ipsoI removed what I suspect that are unnecessary changes.
Comment #19
e0ipsoThis should've also been reverted.
Comment #20
bradjones1@e0ipso - I appreciate the review... the changes you reverted as unnecessary were required to be able to run these tests locally, specifically the post method which adds in the test UA cookie for simpletest. I wasn't able to get these to run locally without them.
I understand if you'd like to limit the scope of the patch but I did have to invest a lot of time into tracking down this particular issue on local testing, and I'm concerned other developers might have similar trouble working on this in the future? Up to you of course as maintainer. Turns out the key was the redirect_url item.
Comment #22
e0ipsoGood point. I'm not convinced about the encryption keys, but that can be dealt with later.
Merging #16, thanks for your contribution!!!
Comment #23
bradjones1Thank you. I moved the encryption keys because in my case, I was testing with a pair of docker containers and the "from" file location on one machine may not be the same as the other, so I tried to simplify this code by storing the data in the class. Agreed it's probably not mandatory but it helped to simplify things when I was debugging simpletest.
Cheers!