Skip to content

Commit

Permalink
fix: ensure minimal got version handles upcoming node version changes
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed Sep 10, 2020
1 parent 74b9bb5 commit fd737a3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
22 changes: 11 additions & 11 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ Fetches an arbitrary resource with the provided Access Token in an Authorization
- `method`: `<string>` The HTTP verb to use for the request. **Default:** 'GET'
- `tokenType`: `<string>` The token type as the Authorization Header scheme. **Default:** 'Bearer'
or the `token_type` property from a passed in TokenSet.
- Returns: `Promise<Response>` Response is a [Got Response](https://github.com/sindresorhus/got/tree/v11.5.2#response)
- Returns: `Promise<Response>` Response is a [Got Response](https://github.com/sindresorhus/got/tree/v11.6.2#response)
with the `body` property being a `<Buffer>`


Expand Down Expand Up @@ -523,7 +523,7 @@ Performs Dynamic Client Read Request to retrieve a Client instance.
#### Customizing HTTP requests

The following are default [`got`][got-library] request
[options](https://github.com/sindresorhus/got/tree/v11.5.2#options) that openid-client sets for all
[options](https://github.com/sindresorhus/got/tree/v11.6.2#options) that openid-client sets for all
requests.

```js
Expand Down Expand Up @@ -552,7 +552,7 @@ This is meant to change global request options such as `timeout` or the default
<summary><em><strong>Example</strong></em> (Click to expand) debugging HTTP requests and responses</summary>

You can use the [`got`][got-library] request
[options.hooks](https://github.com/sindresorhus/got/tree/v11.5.2#options) to log outgoing requests and their responses.
[options.hooks](https://github.com/sindresorhus/got/tree/v11.6.2#options) to log outgoing requests and their responses.

```js
const { custom } = require('openid-client')
Expand Down Expand Up @@ -622,15 +622,15 @@ you need to work around, e.g. adding custom headers or body payload parameters.
```js
const { custom } = require('openid-client');
client[custom.http_options] = function (options) {
// see https://github.com/sindresorhus/got/tree/v11.5.2#advanced-https-api
// see https://github.com/sindresorhus/got/tree/v11.6.2#advanced-https-api
options.https = options.https || {};
options.https.cert = cert; // <string> | <string[]> | <Buffer> | <Buffer[]>
options.https.key = key; // <string> | <string[]> | <Buffer> | <Buffer[]> | <Object[]>
// custom CA
// options.https.ca = ca; // <string> | <string[]> | <Buffer> | <Buffer[]>

// use HTTP(S)_PROXY
// https://github.com/sindresorhus/got/tree/v11.5.2#agent
// https://github.com/sindresorhus/got/tree/v11.6.2#agent
// options.agent = agent;

return options;
Expand All @@ -644,20 +644,20 @@ client[custom.http_options] = function (options) {
```js
const { custom } = require('openid-client');
client[custom.http_options] = function (options) {
// https://github.com/sindresorhus/got/tree/v11.5.2#headers
// https://github.com/sindresorhus/got/tree/v11.6.2#headers
// options.headers = Object.assign(options.headers, { 'custom': 'foo' });

// https://github.com/sindresorhus/got/tree/v11.5.2#timeout
// https://github.com/sindresorhus/got/tree/v11.6.2#timeout
// options.timeout = timeout;

// https://github.com/sindresorhus/got/tree/v11.5.2#retry
// https://github.com/sindresorhus/got/tree/v11.6.2#retry
// options.retry = retry;

// https://github.com/sindresorhus/got/tree/v11.5.2#followredirect
// https://github.com/sindresorhus/got/tree/v11.6.2#followredirect
// options.followRedirect = false;

// use HTTP(S)_PROXY
// https://github.com/sindresorhus/got/tree/v11.5.2#agent
// https://github.com/sindresorhus/got/tree/v11.6.2#agent
// options.agent = agent;

return options;
Expand Down Expand Up @@ -987,5 +987,5 @@ request instance.
[support-sponsor]: https://github.com/sponsors/panva
[jose]: https://github.com/panva/jose
[webfinger-discovery]: https://openid.net/specs/openid-connect-discovery-1_0.html#IssuerDiscovery
[got-library]: https://github.com/sindresorhus/got/tree/v11.5.2
[got-library]: https://github.com/sindresorhus/got/tree/v11.6.2
[client-authentication]: https://openid.net/specs/openid-connect-core-1_0.html#ClientAuthentication
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@
},
"dependencies": {
"base64url": "^3.0.1",
"got": "^11.5.2",
"jose": "^2.0.0",
"got": "^11.6.2",
"jose": "^2.0.1",
"lru-cache": "^6.0.0",
"make-error": "^1.3.6",
"object-hash": "^2.0.1",
Expand All @@ -77,10 +77,10 @@
"@commitlint/config-conventional": "^9.1.1",
"@types/passport": "^1.0.4",
"chai": "^4.2.0",
"eslint": "^7.4.0",
"eslint": "^7.8.1",
"eslint-config-airbnb-base": "^14.2.0",
"eslint-plugin-import": "^2.21.2",
"husky": "^4.0.0",
"husky": "^4.3.0",
"mocha": "^8.0.1",
"nock": "^13.0.2",
"nyc": "^15.1.0",
Expand Down

0 comments on commit fd737a3

Please sign in to comment.