@digipair/skill-oauth2 0.136.3 → 0.136.5
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/dist/index.esm.js
CHANGED
|
@@ -22329,12 +22329,7 @@ var internals = {
|
|
|
22329
22329
|
'lookup',
|
|
22330
22330
|
'family',
|
|
22331
22331
|
'hints'
|
|
22332
|
-
]
|
|
22333
|
-
sensitiveCrossHostHeaders: new Set([
|
|
22334
|
-
'authorization',
|
|
22335
|
-
'cookie',
|
|
22336
|
-
'proxy-authorization'
|
|
22337
|
-
])
|
|
22332
|
+
]
|
|
22338
22333
|
};
|
|
22339
22334
|
// New instance is exported as module.exports
|
|
22340
22335
|
internals.Client = /*#__PURE__*/ function() {
|
|
@@ -22546,7 +22541,7 @@ internals.Client = /*#__PURE__*/ function() {
|
|
|
22546
22541
|
return finishOnce(Boom.badGateway('Received redirection without location', _trace));
|
|
22547
22542
|
}
|
|
22548
22543
|
if (!/^https?:/i.test(location)) {
|
|
22549
|
-
location =
|
|
22544
|
+
location = Url.resolve(uri.href, location);
|
|
22550
22545
|
}
|
|
22551
22546
|
var redirectOptions = Hoek$3.clone(options, {
|
|
22552
22547
|
shallow: internals.shallowOptions
|
|
@@ -22558,15 +22553,16 @@ internals.Client = /*#__PURE__*/ function() {
|
|
|
22558
22553
|
var elapsed = Date.now() - start;
|
|
22559
22554
|
redirectOptions.timeout = (redirectOptions.timeout - elapsed).toString(); // stringify to not drop timeout when === 0
|
|
22560
22555
|
}
|
|
22561
|
-
// When redirecting
|
|
22556
|
+
// When redirecting to a new hostname, remove the authorization and cookie headers
|
|
22562
22557
|
if (redirectOptions.headers) {
|
|
22563
22558
|
var parsedLocation = new URL(location);
|
|
22564
|
-
if (uri.
|
|
22559
|
+
if (uri.hostname !== parsedLocation.hostname) {
|
|
22565
22560
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
22566
22561
|
try {
|
|
22567
22562
|
for(var _iterator = Object.keys(redirectOptions.headers)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
22568
22563
|
var header = _step.value;
|
|
22569
|
-
|
|
22564
|
+
var lowerHeader = header.toLowerCase();
|
|
22565
|
+
if (lowerHeader === 'authorization' || lowerHeader === 'cookie') {
|
|
22570
22566
|
delete redirectOptions.headers[header];
|
|
22571
22567
|
}
|
|
22572
22568
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PinsSettings } from '@digipair/engine';
|
|
2
|
+
export declare const authorizationCodeUrl: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
|
3
|
+
export declare const authorizationCodeAccessToken: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
|
4
|
+
export declare const authorizationCodeCreateToken: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
|
5
|
+
export declare const resourceOwnerPasswordAccessToken: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
|
6
|
+
export declare const resourceOwnerPasswordCreateToken: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
|
7
|
+
export declare const clientCredentialsAccessToken: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
|
8
|
+
export declare const clientCredentialsCreateToken: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
|
9
|
+
export declare const tokenExpired: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
|
10
|
+
export declare const tokenRefresh: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
|
11
|
+
export declare const tokenRevoke: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
|
12
|
+
export declare const tokenRevokeAll: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
|
13
|
+
//# sourceMappingURL=skill-oauth2.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-oauth2.d.ts","sourceRoot":"","sources":["../../../src/lib/skill-oauth2.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AA8GhD,eAAO,MAAM,oBAAoB,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iBACnB,CAAC;AAE9E,eAAO,MAAM,4BAA4B,GACvC,QAAQ,GAAG,EACX,kBAAkB,YAAY,EAAE,EAChC,SAAS,GAAG,iBAC0E,CAAC;AAEzF,eAAO,MAAM,4BAA4B,GACvC,QAAQ,GAAG,EACX,kBAAkB,YAAY,EAAE,EAChC,SAAS,GAAG,iBAC0E,CAAC;AAEzF,eAAO,MAAM,gCAAgC,GAC3C,QAAQ,GAAG,EACX,kBAAkB,YAAY,EAAE,EAChC,SAAS,GAAG,iBAC8E,CAAC;AAE7F,eAAO,MAAM,gCAAgC,GAC3C,QAAQ,GAAG,EACX,kBAAkB,YAAY,EAAE,EAChC,SAAS,GAAG,iBAC8E,CAAC;AAE7F,eAAO,MAAM,4BAA4B,GACvC,QAAQ,GAAG,EACX,kBAAkB,YAAY,EAAE,EAChC,SAAS,GAAG,iBAC0E,CAAC;AAEzF,eAAO,MAAM,4BAA4B,GACvC,QAAQ,GAAG,EACX,kBAAkB,YAAY,EAAE,EAChC,SAAS,GAAG,iBAC0E,CAAC;AAEzF,eAAO,MAAM,YAAY,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iBACnB,CAAC;AAEtE,eAAO,MAAM,YAAY,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iBACnB,CAAC;AAEtE,eAAO,MAAM,WAAW,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iBACnB,CAAC;AAErE,eAAO,MAAM,cAAc,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iBACnB,CAAC"}
|