auth0 3.1.0 → 3.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Change Log
2
2
 
3
+ ## [v3.1.2](https://github.com/auth0/node-auth0/tree/v3.1.2) (2023-01-25)
4
+
5
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v3.1.1...v3.1.2)
6
+
7
+ **Fixed**
8
+
9
+ - Add support for proxy in AuthenticationClient [\#779](https://github.com/auth0/node-auth0/pull/779) ([frederikprijck](https://github.com/frederikprijck))
10
+
11
+ ## [v3.1.1](https://github.com/auth0/node-auth0/tree/v3.1.1) (2023-01-12)
12
+
13
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v3.1.0...v3.1.1)
14
+
15
+ **Fixed**
16
+
17
+ - bump-jwks-rsa [\#776](https://github.com/auth0/node-auth0/pull/776) ([adamjmcgrath](https://github.com/adamjmcgrath))
18
+
3
19
  ## [v3.1.0](https://github.com/auth0/node-auth0/tree/v3.1.0) (2023-01-12)
4
20
 
5
21
  [Full Changelog](https://github.com/auth0/node-auth0/compare/v3.0.1...v3.1.0)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "auth0",
3
- "version": "3.1.0",
3
+ "version": "3.1.2",
4
4
  "description": "SDK for Auth0 API v2",
5
5
  "main": "src/index.js",
6
6
  "sideEffects": false,
@@ -36,7 +36,7 @@
36
36
  "axios": "^0.27.2",
37
37
  "form-data": "^3.0.1",
38
38
  "jsonwebtoken": "^9.0.0",
39
- "jwks-rsa": "^3.0.0",
39
+ "jwks-rsa": "^3.0.1",
40
40
  "lru-memoizer": "^2.1.4",
41
41
  "rest-facade": "^1.16.3",
42
42
  "retry": "^0.13.1",
@@ -10,6 +10,7 @@ class DatabaseAuthenticator {
10
10
  * @param {object} options Authenticator options.
11
11
  * @param {string} options.baseUrl The auth0 account URL.
12
12
  * @param {string} [options.clientId] Default client ID.
13
+ * @param {string} [options.proxy] Add the `superagent-proxy` dependency and specify a proxy url eg 'https://myproxy.com:1234'
13
14
  * @param {OAuthAuthenticator} oauth OAuthAuthenticator instance.
14
15
  */
15
16
  constructor(options, oauth) {
@@ -29,6 +30,7 @@ class DatabaseAuthenticator {
29
30
  const clientOptions = {
30
31
  errorFormatter: { message: 'message', name: 'error' },
31
32
  headers: options.headers,
33
+ proxy: options.proxy,
32
34
  };
33
35
 
34
36
  this.oauth = oauth;
@@ -35,6 +35,7 @@ class OAuthAuthenticator {
35
35
  * @param {string} [options.clientAssertionSigningKey] Private key used to sign the client assertion JWT.
36
36
  * @param {string} [options.clientAssertionSigningAlg] Default 'RS256'.
37
37
  * @param {boolean} [options.__bypassIdTokenValidation] Whether the id_token should be validated or not
38
+ * @param {string} [options.proxy] Add the `superagent-proxy` dependency and specify a proxy url eg 'https://myproxy.com:1234'
38
39
  */
39
40
  constructor(options) {
40
41
  if (!options) {
@@ -54,6 +55,7 @@ class OAuthAuthenticator {
54
55
  errorCustomizer: SanitizedError,
55
56
  errorFormatter: { message: 'message', name: 'error' },
56
57
  headers: options.headers,
58
+ proxy: options.proxy,
57
59
  };
58
60
 
59
61
  this.oauth = new RestClient(`${options.baseUrl}/oauth/:type`, clientOptions);
@@ -29,6 +29,7 @@ class PasswordlessAuthenticator {
29
29
  * @param {string} [options.clientSecret] Default client secret.
30
30
  * @param {string} [options.clientAssertionSigningKey] Private key used to sign the client assertion JWT.
31
31
  * @param {string} [options.clientAssertionSigningAlg] Default 'RS256'.
32
+ * @param {string} [options.proxy] Add the `superagent-proxy` dependency and specify a proxy url eg 'https://myproxy.com:1234'
32
33
  * @param {OAuthAuthenticator} oauth OAuthAuthenticator instance.
33
34
  */
34
35
  constructor(options, oauth) {
@@ -48,6 +49,7 @@ class PasswordlessAuthenticator {
48
49
  const clientOptions = {
49
50
  errorFormatter: { message: 'message', name: 'error' },
50
51
  headers: options.headers,
52
+ proxy: options.proxy,
51
53
  };
52
54
 
53
55
  this.oauth = oauth;
package/src/auth/index.js CHANGED
@@ -42,6 +42,7 @@ class AuthenticationClient {
42
42
  * @param {string} [options.supportedAlgorithms] Algorithms that your application expects to receive
43
43
  * @param {boolean} [options.__bypassIdTokenValidation] Whether the id_token should be validated or not
44
44
  * @param {object} [options.headers] Additional headers that will be added to the outgoing requests.
45
+ * @param {string} [options.proxy] Add the `superagent-proxy` dependency and specify a proxy url eg 'https://myproxy.com:1234'
45
46
  */
46
47
  constructor(options) {
47
48
  if (!options || typeof options !== 'object') {
@@ -67,6 +68,7 @@ class AuthenticationClient {
67
68
  baseUrl: util.format(BASE_URL_FORMAT, options.domain),
68
69
  supportedAlgorithms: options.supportedAlgorithms,
69
70
  __bypassIdTokenValidation: options.__bypassIdTokenValidation,
71
+ proxy: options.proxy,
70
72
  };
71
73
 
72
74
  if (options.telemetry !== false) {
@@ -19,6 +19,7 @@ class ManagementTokenProvider {
19
19
  * @param {boolean} [options.enableCache=true] Enabled or Disable Cache
20
20
  * @param {number} [options.cacheTTLInSeconds] By default the `expires_in` value will be used to determine the cached time of the token, this can be overridden.
21
21
  * @param {object} [options.headers] Additional headers that will be added to the outgoing requests.
22
+ * @param {string} [options.proxy] Add the `superagent-proxy` dependency and specify a proxy url eg 'https://myproxy.com:1234'
22
23
  */
23
24
  constructor(options) {
24
25
  if (!options || typeof options !== 'object') {
@@ -74,6 +75,7 @@ class ManagementTokenProvider {
74
75
  telemetry: this.options.telemetry,
75
76
  clientInfo: this.options.clientInfo,
76
77
  headers: this.options.headers,
78
+ proxy: this.options.proxy,
77
79
  };
78
80
  this.authenticationClient = new AuthenticationClient(authenticationClientOptions);
79
81