-
Notifications
You must be signed in to change notification settings - Fork 74
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
Introduce PHP 8.0 support and update to latest Auth0 PHP SDK version #108
Conversation
@evansims This one could close #103 && #107 Or could be reused to make you gain some time. I'm still not sure how to replace the JWTVerifier. I don't know if you plan to totally remove the service or replace it |
a4b8c8b
to
0df0770
Compare
While running vimeo/psalm I've discovered this issue: https://psalm.dev/docs/running_psalm/issues/ParamNameMismatch/ on JwtGuardAuthenticator::start(). The Symfony interface that this is implementing calls the second parameter It seems like a very minor thing and the code works as-is right now. But the Psalm issue description gives a very good point - in PHP8 one can use named-parameters when calling the method, and one would expect the parameter name to be the same as in the interface definition (since you would want to depend on the interface and not a specific implementation). I suppose it could be solved under this PR as it seems most relevant to this |
Hey @olix21 👋 Thanks so much for your contribution on this, I really appreciate your efforts! I'm on holiday right now but I'll dig into this as soon as I return! 🧐 @mkilmanas Definitely a good catch, this seems like a fine opportunity to slip that fix in here too. I can do that when I'm back from holiday as well. Thanks! |
(Seems some of our CI test hooks on this repo have broken, may need to close/repo this PR a few times as things are fixed to resolve the checks, apologies in advance there.) Good progress and thanks for your contributions so far. Starting to look into what can be done to address the remaining issues here |
…xception to authException
Alright, status checks fixed, sorry for the commit spam. Codecov might report some strange results that will require us to force merge this PR but it's all good at any rate. |
I'll test it today or tomorrow on my project to see if everything is okay 👍 |
Thanks @olix21! I've added new configuration options for optional JWT validators to help with token checks: jwt_auth:
# Token validations to run during JWT decoding:
validations:
# Validate AUD claim against a value, such as an API identifier. Set to false to skip. Defaults to jwt_auth.audience.
aud: "%env(AUTH0_API_AUDIENCE)%"
# Validate the AZP claim against a value, such as a client ID. Set to false to skip. Defaults to false.
azp: "%env(AUTH0_CLIENT_ID)%"
# Maximum age (in seconds) since the auth_time of the token. Set to false to skip. Defaults to false.
max_age: 3600
# Clock tolerance (in seconds) for token expiration checks. Requires an integer value. Defaults to 60 seconds.
leeway: 60 These are applied during |
Hey @olix21 just wanted to see if you'd had a chance to try these changes out yet. No worries if not, but I wanted to move ahead with getting this approved through our internal review process if you felt alright with things. |
Hello @evansims I just managed to fix some issues with vendor dependencies compatibility. I hope it will be done today EDIT: I did receive the information I needed, I tested your latest implementation and it's working well on my app! Thank you for your work! |
@olix21 Thrilled to hear that, thanks for checking on it for me! And thank YOU for your efforts here, we really appreciate it! Just a heads up, I'm going to update your original post here to outline the changes made, just to ease future reference and aid in our review process. |
Pinging @jimmyjames 👷 As discussed in our call, now that I have confirmed this works for the community, this is ready for you to take a look at when you have the time! I updated the original post to break down the changes. Please feel free to ping me on Slack with questions! |
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.
👍 great to see this collaboration here!
Thanks for taking a look at this, @jimmyjames! @olix21, again, thanks so much for your help on this! Going to merge this in for the next release. Next, we'll get an internal security review going on these changes so we can officially cut the release, hopefully within the next week-ish. I'll update you with the progress. |
@evansims I would like to test these changes but when I request
Which is this commit: cff682d. Specifying the latest comit (#00769c76fe264071746e86be6a422d4ac076e520) seems to give me an outdated folder as well. Just to make sure; do we need to do anything on our end to test the latest branch or is this just an issue on my side? Edit:
|
Sorry about that @darthf1, it looks like our webhook for auto-updating Packagist wasn't working right, so it was using stale data. I've kicked it manually for now, so requiring dev-master should reflect the appropriate state of things now. |
This pull request includes changes necessary to support PHP 8.0, 7.6 of the Auth0 PHP SDK, and modern versions of Symfony, and makes some quality of life improvements along the way.
Functional changes:
Testing changes:
Documentation changes: