okta / okta-jwt-verifier-js

okta-jwt-verifier-js
https://github.com/okta/okta-jwt-verifier-js
Other
16 stars 9 forks source link

feat: add support for `requestAgent` #27

Closed dnafication closed 1 year ago

dnafication commented 1 year ago

requestAgent will be forwarded to jwks-rsa client.

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

What is the current behavior?

Issue Number: #26

The jwks-rsa library has replaced the requestAgentOptions option with a new option called requestAgent. This option is used to specify a custom HTTP agent to be used when making requests to the JWKS endpoint. The agent can be any object that conforms to the Node.js http.Agent interface.

What is the new behavior?

Does this PR introduce a breaking change?

It introduces a new feature and marks requestAgentOptions as deprecated which is no longer supported by jwks-rsa.

Other information

Reviewers

denysoblohin-okta commented 1 year ago

Thanks for submitting PR. Internal ref: OKTA-569666

Do you think we should leave requestAgentOptions with @deprecated flag or just remove it as it's useless?

dnafication commented 1 year ago

@denysoblohin-okta, removing will avoid any future confusions. I left it there to have someone from okta review it once. I'll update the PR and documentation if any. Thanks

dnafication commented 1 year ago

I've removed requestAgentOptions from the verifier options. Can you please update the Release documentation regarding the new option? The example from issue #26 can be used in the release notes to let users know how to refactor their code.

robertdamphousse-okta commented 1 year ago

Thanks @dnafication for this PR, we will be reviewing it in our next sprint

jaredperreault-okta commented 1 year ago

This was addressed in 3.0.1 (https://github.com/okta/okta-jwt-verifier-js/pull/28)