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

feat: provide method to set request headers #891

Closed
wants to merge 2 commits into from

Conversation

aarongranick-okta
Copy link
Contributor

@aarongranick-okta aarongranick-okta commented Aug 5, 2021

Adds a new sub-api, "http" with one method (so far), setRequestHeader. This allows setting the "headers" option after the AuthJS has already been constructed. Options set here will effect both IDX and non-IDX requests.

The primary purpose of this commit is to set custom request headers on IDX requests, specifically for device fingerprinting. This is needed to unblock removing idx-js dependency from the widget.

One (nice) side-effect of this commit is that the full "sdk" user-agent will now be sent on IDX API requests.

@aarongranick-okta aarongranick-okta force-pushed the ag-OKTA-417451-idx-fingerprint branch from 296b32d to 21c424a Compare August 5, 2021 17:49
@codecov-commenter
Copy link

codecov-commenter commented Aug 5, 2021

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 95.91837% with 2 lines in your changes missing coverage. Please review.

Project coverage is 91.58%. Comparing base (d1aa910) to head (e353d0b).
Report is 416 commits behind head on master.

Files with missing lines Patch % Lines
lib/oidc/endpoints/token.ts 66.66% 1 Missing ⚠️
lib/tx/api.ts 75.00% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #891      +/-   ##
==========================================
+ Coverage   91.54%   91.58%   +0.04%     
==========================================
  Files         117      120       +3     
  Lines        3359     3375      +16     
  Branches      694      695       +1     
==========================================
+ Hits         3075     3091      +16     
  Misses        284      284              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@shuowu shuowu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changelog

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.

4 participants