Skip to content
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

Allow adding custom headers when fetching a JWKS document. #51

Closed
wants to merge 1 commit into from

Conversation

dmaze
Copy link

@dmaze dmaze commented Sep 4, 2018

We have an environment where we need to provide custom headers to HTTP GET a JWKS document (more specifically, an l5d-dtab: routing header for the linkerd service mesh). This PR adds an optional headers: field to the JwksClient configuration, which allows us to do:

import jwksRsa from 'jwks-rsa';

jwksRsa.expressJwtSecret({
  jwksUri: 'http:https://service.name/jwks.json',
  headers: { 'l5d-dtab': '/foo=>/bar' }
});

The headers field is optional and the default is to add no additional headers; this should not introduce any compatibility issues for existing code.

@dmaze
Copy link
Author

dmaze commented Jun 6, 2019

This PR is essentially identical to #77 (and its predecessor #64).

@dmaze dmaze closed this Jun 6, 2019
@dmaze dmaze deleted the request-headers branch June 6, 2019 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants