@fluidframework/odsp-doclib-utils 2.74.0-365691 → 2.74.0-370705

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.
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export declare const pkgName = "@fluidframework/odsp-doclib-utils";
8
- export declare const pkgVersion = "2.74.0-365691";
8
+ export declare const pkgVersion = "2.74.0-370705";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -8,5 +8,5 @@
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.pkgVersion = exports.pkgName = void 0;
10
10
  exports.pkgName = "@fluidframework/odsp-doclib-utils";
11
- exports.pkgVersion = "2.74.0-365691";
11
+ exports.pkgVersion = "2.74.0-370705";
12
12
  //# sourceMappingURL=packageVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,mCAAmC,CAAC;AAC9C,QAAA,UAAU,GAAG,eAAe,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/odsp-doclib-utils\";\nexport const pkgVersion = \"2.74.0-365691\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,mCAAmC,CAAC;AAC9C,QAAA,UAAU,GAAG,eAAe,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/odsp-doclib-utils\";\nexport const pkgVersion = \"2.74.0-370705\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"parseAuthErrorTenant.d.ts","sourceRoot":"","sources":["../src/parseAuthErrorTenant.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,oBAAoB,CAAC,cAAc,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CA+BhF"}
1
+ {"version":3,"file":"parseAuthErrorTenant.d.ts","sourceRoot":"","sources":["../src/parseAuthErrorTenant.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,oBAAoB,CAAC,cAAc,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CA8BhF"}
@@ -6,7 +6,6 @@
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.parseAuthErrorTenant = void 0;
8
8
  const oAuthBearerScheme = "Bearer";
9
- /* eslint-disable @fluid-internal/fluid/no-hyphen-after-jsdoc-tag -- false positive AB#50920 */
10
9
  /**
11
10
  * Checks if response headers contains `www-authenticate` header and extracts tenant id that should be
12
11
  * used to identify authority which must be used to issue access token for protected resource.
@@ -24,7 +23,6 @@ const oAuthBearerScheme = "Bearer";
24
23
  * ```
25
24
  */
26
25
  function parseAuthErrorTenant(responseHeader) {
27
- /* eslint-enable @fluid-internal/fluid/no-hyphen-after-jsdoc-tag */
28
26
  const authHeaderData = responseHeader.get("www-authenticate");
29
27
  if (!authHeaderData) {
30
28
  return undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"parseAuthErrorTenant.js","sourceRoot":"","sources":["../src/parseAuthErrorTenant.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,MAAM,iBAAiB,GAAG,QAAQ,CAAC;AAEnC,+FAA+F;AAC/F;;;;;;;;;;;;;;;GAeG;AACH,SAAgB,oBAAoB,CAAC,cAAuB;IAC3D,mEAAmE;IACnE,MAAM,cAAc,GAAG,cAAc,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;IAC9D,IAAI,CAAC,cAAc,EAAE,CAAC;QACrB,OAAO,SAAS,CAAC;IAClB,CAAC;IAED,4CAA4C;IAC5C,MAAM,iBAAiB,GAAG,cAAc,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACpE,IAAI,iBAAiB,GAAG,CAAC,EAAE,CAAC;QAC3B,OAAO,SAAS,CAAC;IAClB,CAAC;IAED,IAAI,QAA4B,CAAC;IACjC,cAAc;SACZ,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,iBAAiB,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;SAChE,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;QAChB,IAAI,CAAC,QAAQ,EAAE,CAAC;YACf,MAAM,aAAa,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACzC,8FAA8F;YAC9F,IAAI,aAAa,CAAC,MAAM,IAAI,CAAC,IAAI,aAAa,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,KAAK,OAAO,EAAE,CAAC;gBACpF,iDAAiD;gBACjD,mEAAmE;gBACnE,mEAAmE;gBACnE,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;YAChD,CAAC;QACF,CAAC;IACF,CAAC,CAAC,CAAC;IAEJ,OAAO,QAAQ,CAAC;AACjB,CAAC;AA/BD,oDA+BC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nconst oAuthBearerScheme = \"Bearer\";\n\n/* eslint-disable @fluid-internal/fluid/no-hyphen-after-jsdoc-tag -- false positive AB#50920 */\n/**\n * Checks if response headers contains `www-authenticate` header and extracts tenant id that should be\n * used to identify authority which must be used to issue access token for protected resource.\n * Tenant id is represented by \"realm\" property. More details can be found here:\n * {@link https://tools.ietf.org/html/rfc2617#page-8}\n *\n * @example Header sample\n *\n * ```\n * www-authenticate=Bearer realm=\"03d0c210-38e8-47d7-9bc9-9ff2cd5ea7bc\",\n * client_id=\"00000003-0000-0ff1-ce00-000000000000\",\n * trusted_issuers=\"00000001-0000-0000-c000-000000000000@*,D3776938-3DBA-481F-A652-4BEDFCAB7CD8@*,\n * https://sts.windows.net/*,00000003-0000-0ff1-ce00-000000000000@90140122-8516-11e1-8eff-49304924019b\",\n * authorization_uri=\"https://login.windows.net/common/oauth2/authorize\"\n * ```\n */\nexport function parseAuthErrorTenant(responseHeader: Headers): string | undefined {\n\t/* eslint-enable @fluid-internal/fluid/no-hyphen-after-jsdoc-tag */\n\tconst authHeaderData = responseHeader.get(\"www-authenticate\");\n\tif (!authHeaderData) {\n\t\treturn undefined;\n\t}\n\n\t// header value must contain 'Bearer' scheme\n\tconst indexOfBearerInfo = authHeaderData.indexOf(oAuthBearerScheme);\n\tif (indexOfBearerInfo < 0) {\n\t\treturn undefined;\n\t}\n\n\tlet tenantId: string | undefined;\n\tauthHeaderData\n\t\t.slice(Math.max(0, indexOfBearerInfo + oAuthBearerScheme.length))\n\t\t.split(\",\")\n\t\t.map((section) => {\n\t\t\tif (!tenantId) {\n\t\t\t\tconst nameValuePair = section.split(\"=\");\n\t\t\t\t// values can be encoded and contain '=' symbol inside so it is possible to have more than one\n\t\t\t\tif (nameValuePair.length >= 2 && nameValuePair[0].trim().toLowerCase() === \"realm\") {\n\t\t\t\t\t// TODO: this is assigning an object to a string.\n\t\t\t\t\t// If this is intentional, we should document what's going on here.\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n\t\t\t\t\ttenantId = JSON.parse(nameValuePair[1].trim());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\treturn tenantId;\n}\n"]}
1
+ {"version":3,"file":"parseAuthErrorTenant.js","sourceRoot":"","sources":["../src/parseAuthErrorTenant.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,MAAM,iBAAiB,GAAG,QAAQ,CAAC;AAEnC;;;;;;;;;;;;;;;GAeG;AACH,SAAgB,oBAAoB,CAAC,cAAuB;IAC3D,MAAM,cAAc,GAAG,cAAc,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;IAC9D,IAAI,CAAC,cAAc,EAAE,CAAC;QACrB,OAAO,SAAS,CAAC;IAClB,CAAC;IAED,4CAA4C;IAC5C,MAAM,iBAAiB,GAAG,cAAc,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACpE,IAAI,iBAAiB,GAAG,CAAC,EAAE,CAAC;QAC3B,OAAO,SAAS,CAAC;IAClB,CAAC;IAED,IAAI,QAA4B,CAAC;IACjC,cAAc;SACZ,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,iBAAiB,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;SAChE,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;QAChB,IAAI,CAAC,QAAQ,EAAE,CAAC;YACf,MAAM,aAAa,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACzC,8FAA8F;YAC9F,IAAI,aAAa,CAAC,MAAM,IAAI,CAAC,IAAI,aAAa,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,KAAK,OAAO,EAAE,CAAC;gBACpF,iDAAiD;gBACjD,mEAAmE;gBACnE,mEAAmE;gBACnE,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;YAChD,CAAC;QACF,CAAC;IACF,CAAC,CAAC,CAAC;IAEJ,OAAO,QAAQ,CAAC;AACjB,CAAC;AA9BD,oDA8BC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nconst oAuthBearerScheme = \"Bearer\";\n\n/**\n * Checks if response headers contains `www-authenticate` header and extracts tenant id that should be\n * used to identify authority which must be used to issue access token for protected resource.\n * Tenant id is represented by \"realm\" property. More details can be found here:\n * {@link https://tools.ietf.org/html/rfc2617#page-8}\n *\n * @example Header sample\n *\n * ```\n * www-authenticate=Bearer realm=\"03d0c210-38e8-47d7-9bc9-9ff2cd5ea7bc\",\n * client_id=\"00000003-0000-0ff1-ce00-000000000000\",\n * trusted_issuers=\"00000001-0000-0000-c000-000000000000@*,D3776938-3DBA-481F-A652-4BEDFCAB7CD8@*,\n * https://sts.windows.net/*,00000003-0000-0ff1-ce00-000000000000@90140122-8516-11e1-8eff-49304924019b\",\n * authorization_uri=\"https://login.windows.net/common/oauth2/authorize\"\n * ```\n */\nexport function parseAuthErrorTenant(responseHeader: Headers): string | undefined {\n\tconst authHeaderData = responseHeader.get(\"www-authenticate\");\n\tif (!authHeaderData) {\n\t\treturn undefined;\n\t}\n\n\t// header value must contain 'Bearer' scheme\n\tconst indexOfBearerInfo = authHeaderData.indexOf(oAuthBearerScheme);\n\tif (indexOfBearerInfo < 0) {\n\t\treturn undefined;\n\t}\n\n\tlet tenantId: string | undefined;\n\tauthHeaderData\n\t\t.slice(Math.max(0, indexOfBearerInfo + oAuthBearerScheme.length))\n\t\t.split(\",\")\n\t\t.map((section) => {\n\t\t\tif (!tenantId) {\n\t\t\t\tconst nameValuePair = section.split(\"=\");\n\t\t\t\t// values can be encoded and contain '=' symbol inside so it is possible to have more than one\n\t\t\t\tif (nameValuePair.length >= 2 && nameValuePair[0].trim().toLowerCase() === \"realm\") {\n\t\t\t\t\t// TODO: this is assigning an object to a string.\n\t\t\t\t\t// If this is intentional, we should document what's going on here.\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n\t\t\t\t\ttenantId = JSON.parse(nameValuePair[1].trim());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\treturn tenantId;\n}\n"]}
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export declare const pkgName = "@fluidframework/odsp-doclib-utils";
8
- export declare const pkgVersion = "2.74.0-365691";
8
+ export declare const pkgVersion = "2.74.0-370705";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export const pkgName = "@fluidframework/odsp-doclib-utils";
8
- export const pkgVersion = "2.74.0-365691";
8
+ export const pkgVersion = "2.74.0-370705";
9
9
  //# sourceMappingURL=packageVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,mCAAmC,CAAC;AAC3D,MAAM,CAAC,MAAM,UAAU,GAAG,eAAe,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/odsp-doclib-utils\";\nexport const pkgVersion = \"2.74.0-365691\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,mCAAmC,CAAC;AAC3D,MAAM,CAAC,MAAM,UAAU,GAAG,eAAe,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/odsp-doclib-utils\";\nexport const pkgVersion = \"2.74.0-370705\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"parseAuthErrorTenant.d.ts","sourceRoot":"","sources":["../src/parseAuthErrorTenant.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,oBAAoB,CAAC,cAAc,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CA+BhF"}
1
+ {"version":3,"file":"parseAuthErrorTenant.d.ts","sourceRoot":"","sources":["../src/parseAuthErrorTenant.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,oBAAoB,CAAC,cAAc,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CA8BhF"}
@@ -3,7 +3,6 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  const oAuthBearerScheme = "Bearer";
6
- /* eslint-disable @fluid-internal/fluid/no-hyphen-after-jsdoc-tag -- false positive AB#50920 */
7
6
  /**
8
7
  * Checks if response headers contains `www-authenticate` header and extracts tenant id that should be
9
8
  * used to identify authority which must be used to issue access token for protected resource.
@@ -21,7 +20,6 @@ const oAuthBearerScheme = "Bearer";
21
20
  * ```
22
21
  */
23
22
  export function parseAuthErrorTenant(responseHeader) {
24
- /* eslint-enable @fluid-internal/fluid/no-hyphen-after-jsdoc-tag */
25
23
  const authHeaderData = responseHeader.get("www-authenticate");
26
24
  if (!authHeaderData) {
27
25
  return undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"parseAuthErrorTenant.js","sourceRoot":"","sources":["../src/parseAuthErrorTenant.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,iBAAiB,GAAG,QAAQ,CAAC;AAEnC,+FAA+F;AAC/F;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,oBAAoB,CAAC,cAAuB;IAC3D,mEAAmE;IACnE,MAAM,cAAc,GAAG,cAAc,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;IAC9D,IAAI,CAAC,cAAc,EAAE,CAAC;QACrB,OAAO,SAAS,CAAC;IAClB,CAAC;IAED,4CAA4C;IAC5C,MAAM,iBAAiB,GAAG,cAAc,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACpE,IAAI,iBAAiB,GAAG,CAAC,EAAE,CAAC;QAC3B,OAAO,SAAS,CAAC;IAClB,CAAC;IAED,IAAI,QAA4B,CAAC;IACjC,cAAc;SACZ,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,iBAAiB,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;SAChE,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;QAChB,IAAI,CAAC,QAAQ,EAAE,CAAC;YACf,MAAM,aAAa,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACzC,8FAA8F;YAC9F,IAAI,aAAa,CAAC,MAAM,IAAI,CAAC,IAAI,aAAa,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,KAAK,OAAO,EAAE,CAAC;gBACpF,iDAAiD;gBACjD,mEAAmE;gBACnE,mEAAmE;gBACnE,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;YAChD,CAAC;QACF,CAAC;IACF,CAAC,CAAC,CAAC;IAEJ,OAAO,QAAQ,CAAC;AACjB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nconst oAuthBearerScheme = \"Bearer\";\n\n/* eslint-disable @fluid-internal/fluid/no-hyphen-after-jsdoc-tag -- false positive AB#50920 */\n/**\n * Checks if response headers contains `www-authenticate` header and extracts tenant id that should be\n * used to identify authority which must be used to issue access token for protected resource.\n * Tenant id is represented by \"realm\" property. More details can be found here:\n * {@link https://tools.ietf.org/html/rfc2617#page-8}\n *\n * @example Header sample\n *\n * ```\n * www-authenticate=Bearer realm=\"03d0c210-38e8-47d7-9bc9-9ff2cd5ea7bc\",\n * client_id=\"00000003-0000-0ff1-ce00-000000000000\",\n * trusted_issuers=\"00000001-0000-0000-c000-000000000000@*,D3776938-3DBA-481F-A652-4BEDFCAB7CD8@*,\n * https://sts.windows.net/*,00000003-0000-0ff1-ce00-000000000000@90140122-8516-11e1-8eff-49304924019b\",\n * authorization_uri=\"https://login.windows.net/common/oauth2/authorize\"\n * ```\n */\nexport function parseAuthErrorTenant(responseHeader: Headers): string | undefined {\n\t/* eslint-enable @fluid-internal/fluid/no-hyphen-after-jsdoc-tag */\n\tconst authHeaderData = responseHeader.get(\"www-authenticate\");\n\tif (!authHeaderData) {\n\t\treturn undefined;\n\t}\n\n\t// header value must contain 'Bearer' scheme\n\tconst indexOfBearerInfo = authHeaderData.indexOf(oAuthBearerScheme);\n\tif (indexOfBearerInfo < 0) {\n\t\treturn undefined;\n\t}\n\n\tlet tenantId: string | undefined;\n\tauthHeaderData\n\t\t.slice(Math.max(0, indexOfBearerInfo + oAuthBearerScheme.length))\n\t\t.split(\",\")\n\t\t.map((section) => {\n\t\t\tif (!tenantId) {\n\t\t\t\tconst nameValuePair = section.split(\"=\");\n\t\t\t\t// values can be encoded and contain '=' symbol inside so it is possible to have more than one\n\t\t\t\tif (nameValuePair.length >= 2 && nameValuePair[0].trim().toLowerCase() === \"realm\") {\n\t\t\t\t\t// TODO: this is assigning an object to a string.\n\t\t\t\t\t// If this is intentional, we should document what's going on here.\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n\t\t\t\t\ttenantId = JSON.parse(nameValuePair[1].trim());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\treturn tenantId;\n}\n"]}
1
+ {"version":3,"file":"parseAuthErrorTenant.js","sourceRoot":"","sources":["../src/parseAuthErrorTenant.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,iBAAiB,GAAG,QAAQ,CAAC;AAEnC;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,oBAAoB,CAAC,cAAuB;IAC3D,MAAM,cAAc,GAAG,cAAc,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;IAC9D,IAAI,CAAC,cAAc,EAAE,CAAC;QACrB,OAAO,SAAS,CAAC;IAClB,CAAC;IAED,4CAA4C;IAC5C,MAAM,iBAAiB,GAAG,cAAc,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACpE,IAAI,iBAAiB,GAAG,CAAC,EAAE,CAAC;QAC3B,OAAO,SAAS,CAAC;IAClB,CAAC;IAED,IAAI,QAA4B,CAAC;IACjC,cAAc;SACZ,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,iBAAiB,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;SAChE,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;QAChB,IAAI,CAAC,QAAQ,EAAE,CAAC;YACf,MAAM,aAAa,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACzC,8FAA8F;YAC9F,IAAI,aAAa,CAAC,MAAM,IAAI,CAAC,IAAI,aAAa,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,KAAK,OAAO,EAAE,CAAC;gBACpF,iDAAiD;gBACjD,mEAAmE;gBACnE,mEAAmE;gBACnE,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;YAChD,CAAC;QACF,CAAC;IACF,CAAC,CAAC,CAAC;IAEJ,OAAO,QAAQ,CAAC;AACjB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nconst oAuthBearerScheme = \"Bearer\";\n\n/**\n * Checks if response headers contains `www-authenticate` header and extracts tenant id that should be\n * used to identify authority which must be used to issue access token for protected resource.\n * Tenant id is represented by \"realm\" property. More details can be found here:\n * {@link https://tools.ietf.org/html/rfc2617#page-8}\n *\n * @example Header sample\n *\n * ```\n * www-authenticate=Bearer realm=\"03d0c210-38e8-47d7-9bc9-9ff2cd5ea7bc\",\n * client_id=\"00000003-0000-0ff1-ce00-000000000000\",\n * trusted_issuers=\"00000001-0000-0000-c000-000000000000@*,D3776938-3DBA-481F-A652-4BEDFCAB7CD8@*,\n * https://sts.windows.net/*,00000003-0000-0ff1-ce00-000000000000@90140122-8516-11e1-8eff-49304924019b\",\n * authorization_uri=\"https://login.windows.net/common/oauth2/authorize\"\n * ```\n */\nexport function parseAuthErrorTenant(responseHeader: Headers): string | undefined {\n\tconst authHeaderData = responseHeader.get(\"www-authenticate\");\n\tif (!authHeaderData) {\n\t\treturn undefined;\n\t}\n\n\t// header value must contain 'Bearer' scheme\n\tconst indexOfBearerInfo = authHeaderData.indexOf(oAuthBearerScheme);\n\tif (indexOfBearerInfo < 0) {\n\t\treturn undefined;\n\t}\n\n\tlet tenantId: string | undefined;\n\tauthHeaderData\n\t\t.slice(Math.max(0, indexOfBearerInfo + oAuthBearerScheme.length))\n\t\t.split(\",\")\n\t\t.map((section) => {\n\t\t\tif (!tenantId) {\n\t\t\t\tconst nameValuePair = section.split(\"=\");\n\t\t\t\t// values can be encoded and contain '=' symbol inside so it is possible to have more than one\n\t\t\t\tif (nameValuePair.length >= 2 && nameValuePair[0].trim().toLowerCase() === \"realm\") {\n\t\t\t\t\t// TODO: this is assigning an object to a string.\n\t\t\t\t\t// If this is intentional, we should document what's going on here.\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n\t\t\t\t\ttenantId = JSON.parse(nameValuePair[1].trim());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\treturn tenantId;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/odsp-doclib-utils",
3
- "version": "2.74.0-365691",
3
+ "version": "2.74.0-370705",
4
4
  "description": "ODSP utilities",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -69,23 +69,23 @@
69
69
  "temp-directory": "nyc/.nyc_output"
70
70
  },
71
71
  "dependencies": {
72
- "@fluid-internal/client-utils": "2.74.0-365691",
73
- "@fluidframework/core-interfaces": "2.74.0-365691",
74
- "@fluidframework/core-utils": "2.74.0-365691",
75
- "@fluidframework/driver-definitions": "2.74.0-365691",
76
- "@fluidframework/driver-utils": "2.74.0-365691",
77
- "@fluidframework/odsp-driver-definitions": "2.74.0-365691",
78
- "@fluidframework/telemetry-utils": "2.74.0-365691",
72
+ "@fluid-internal/client-utils": "2.74.0-370705",
73
+ "@fluidframework/core-interfaces": "2.74.0-370705",
74
+ "@fluidframework/core-utils": "2.74.0-370705",
75
+ "@fluidframework/driver-definitions": "2.74.0-370705",
76
+ "@fluidframework/driver-utils": "2.74.0-370705",
77
+ "@fluidframework/odsp-driver-definitions": "2.74.0-370705",
78
+ "@fluidframework/telemetry-utils": "2.74.0-370705",
79
79
  "isomorphic-fetch": "^3.0.0"
80
80
  },
81
81
  "devDependencies": {
82
82
  "@arethetypeswrong/cli": "^0.17.1",
83
83
  "@biomejs/biome": "~1.9.3",
84
- "@fluid-internal/mocha-test-setup": "2.74.0-365691",
84
+ "@fluid-internal/mocha-test-setup": "2.74.0-370705",
85
85
  "@fluid-tools/build-cli": "^0.60.0",
86
86
  "@fluidframework/build-common": "^2.0.3",
87
87
  "@fluidframework/build-tools": "^0.60.0",
88
- "@fluidframework/eslint-config-fluid": "2.74.0-365691",
88
+ "@fluidframework/eslint-config-fluid": "2.74.0-370705",
89
89
  "@fluidframework/odsp-doclib-utils-previous": "npm:@fluidframework/odsp-doclib-utils@2.73.0",
90
90
  "@microsoft/api-extractor": "7.52.11",
91
91
  "@types/isomorphic-fetch": "^0.0.39",
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/odsp-doclib-utils";
9
- export const pkgVersion = "2.74.0-365691";
9
+ export const pkgVersion = "2.74.0-370705";
@@ -5,7 +5,6 @@
5
5
 
6
6
  const oAuthBearerScheme = "Bearer";
7
7
 
8
- /* eslint-disable @fluid-internal/fluid/no-hyphen-after-jsdoc-tag -- false positive AB#50920 */
9
8
  /**
10
9
  * Checks if response headers contains `www-authenticate` header and extracts tenant id that should be
11
10
  * used to identify authority which must be used to issue access token for protected resource.
@@ -23,7 +22,6 @@ const oAuthBearerScheme = "Bearer";
23
22
  * ```
24
23
  */
25
24
  export function parseAuthErrorTenant(responseHeader: Headers): string | undefined {
26
- /* eslint-enable @fluid-internal/fluid/no-hyphen-after-jsdoc-tag */
27
25
  const authHeaderData = responseHeader.get("www-authenticate");
28
26
  if (!authHeaderData) {
29
27
  return undefined;