draft: Replace passport-openidconnect with openid-clien - #4
Draft
leeomara wants to merge 3 commits into
Draft
Conversation
Therese a case-sensitivity dispute between what's returned from the token endpoint and what's required in the Authorization header for the userinfo endpoint
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.
This is a work in progress which should not be merged yet.
This is some experimentation to investigate the use of OpenID client instead of passport-openidconnect. This relates to #3.
Checklist
Overall status
This is somewhat working, though the code is a mess as I don't know TS, nor Node, Express, Passport or modern JS development practices. You've been warned!
Current roadblock
The headers for hitting userinfo endpoint are using lower case. It looks like Hydra/C1 wants "Authorization: Bearer ...". C1 needs a capital "B" for "Bearer" there
I'm unable to untangle the specs on this.
https://tools.ietf.org/html/rfc7230#section-3.2
This suggests that it should be case-sensitive, but isn't 100% clear.
https://tools.ietf.org/html/rfc6750
Many other OpenID Connect/OAuth2 clients and servers have this issue:
authorizationheader in/oauth2/tokenendpoint is case sensitive ory/hydra#575Okay, so the token endpoint returns a "token_type" of "bearer", but then requires the userinfo endpoint to use "Bearer"
Some options
Vivvo uses https://github.com/vivvo/hydra