Improve token construction logic and change key getter to public#35
Open
bradjones1 wants to merge 1 commit intopatrickbussmann:mainfrom
Open
Improve token construction logic and change key getter to public#35bradjones1 wants to merge 1 commit intopatrickbussmann:mainfrom
bradjones1 wants to merge 1 commit intopatrickbussmann:mainfrom
Conversation
Owner
|
Thanks for your pull request @bradjones1. |
Author
|
I still intend to loop around on this, just busy building the project that this is used in 😂 Came back here to note that phpstan failed here b/c the param annotation expects |
6e9831d to
6b38a21
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Thanks for this package; Apple is pretty frustrating in that they kinda look like OAuth but their implementation is, well, wacky!
I am in a situation where I am doing both native app sign-in with Apple (because it's required...) as well as supporting sign-in with Apple on the web. Because their implementation looks like OpenID Connect but they don't support a user info endpoint, I'm passing the web back-end the ID token (a JWS) and using that to extract out the user's identity. This is done via a token exchange grant.
Anyway, I needed a way to construct an access token object using the ID token, and found that 1) the docblock on the constructor didn't reflect the true data requirements of the method and 2) it would be helpful to be able to fetch the Apple JWK set outside of the provider.
This PR addresses both points, which I think help make this package more syntactically correct and useful.
Admittedly this is a bit of a drive-by contribution but if this looks good in spirit, I can make whatever adjustments you'd like, e.g. test coverage. I'm not quite sure this requires new coverage?