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.
added an RFC 7662 compliant OAuth2 auth adapter #4910
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
added an RFC 7662 compliant OAuth2 auth adapter #4910
Changes from 17 commits
01c46e4
b1db2d2
eca9e9e
c7c001b
672f06f
fe15745
53a26a9
afe4396
b9d523a
1412aa0
498b0a1
9e3570f
c17f594
6b7fb4a
654c427
e804995
f791aee
81cac2c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
prefer destructuring.
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.
can we get a few comments on this logic please?
I have no idea how to debug / maintain this
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.
You mean comments on what the "appidField" in the auth adapter's options object is supposed to do?
I did write about it in the leading long comment (documentation) of the adapter.
See:
So the basic idea is that the "appId" term comes from Google/Facebook (and their respective Parse auth adapters). However they do not implement RFC 7662 yet, so we cannot know how they would incorporate this appId in a RFC-compliant token introspection response (it can contain custom/non-standard fields).
To make this OAuth2 auth adapter flexible and future-proof, I added an optional appId support. If we specifiy in the adapter config a field name, then the code will check whether such a field exists in the token introspection endpoint response and it checks it's contents against the appId list in the adapter config.
Should I add any of this as a comment to the code? I thought that the documentation of the "appidField" config property is detailed enough and the actual implementation of the appId check speaks for itself.