@azure/service-bus 7.10.0-alpha.20250122.1 → 7.10.0-alpha.20250124.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/dist/browser/util/parseUrl-browser.d.mts.map +1 -1
- package/dist/browser/util/parseUrl-browser.mjs.map +1 -1
- package/dist/browser/util/parseUrl.js +0 -2
- package/dist/browser/util/sasServiceClientCredentials.d.ts.map +1 -1
- package/dist/browser/util/sasServiceClientCredentials.js +0 -2
- package/dist/browser/util/sasServiceClientCredentials.js.map +1 -1
- package/dist/commonjs/util/parseUrl.d.ts.map +1 -1
- package/dist/commonjs/util/parseUrl.js +0 -2
- package/dist/commonjs/util/parseUrl.js.map +1 -1
- package/dist/commonjs/util/sasServiceClientCredentials.d.ts.map +1 -1
- package/dist/commonjs/util/sasServiceClientCredentials.js +0 -2
- package/dist/commonjs/util/sasServiceClientCredentials.js.map +1 -1
- package/dist/esm/util/parseUrl.d.ts.map +1 -1
- package/dist/esm/util/parseUrl.js +0 -2
- package/dist/esm/util/parseUrl.js.map +1 -1
- package/dist/esm/util/sasServiceClientCredentials.d.ts.map +1 -1
- package/dist/esm/util/sasServiceClientCredentials.js +0 -2
- package/dist/esm/util/sasServiceClientCredentials.js.map +1 -1
- package/dist/react-native/util/parseUrl.d.ts.map +1 -1
- package/dist/react-native/util/parseUrl.js +0 -2
- package/dist/react-native/util/parseUrl.js.map +1 -1
- package/dist/react-native/util/sasServiceClientCredentials.d.ts.map +1 -1
- package/dist/react-native/util/sasServiceClientCredentials.js +0 -2
- package/dist/react-native/util/sasServiceClientCredentials.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseUrl-browser.d.mts","sourceRoot":"","sources":["../../../src/util/parseUrl-browser.mts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parseUrl-browser.d.mts","sourceRoot":"","sources":["../../../src/util/parseUrl-browser.mts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,QAAQ,WAAY,MAAM,KAAG,GAIzC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseUrl-browser.mjs","sourceRoot":"","sources":["../../../src/util/parseUrl-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;
|
|
1
|
+
{"version":3,"file":"parseUrl-browser.mjs","sourceRoot":"","sources":["../../../src/util/parseUrl-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC;;GAEG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,MAAc,EAAO,EAAE;IAC9C,6DAA6D;IAC7D,gDAAgD;IAChD,OAAO,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AAC9B,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/**\n * @internal\n */\nexport const parseURL = (rawUrl: string): any => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore: \"self\" will exist in the browser.\n return new self.URL(rawUrl);\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sasServiceClientCredentials.d.ts","sourceRoot":"","sources":["../../../src/util/sasServiceClientCredentials.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sasServiceClientCredentials.d.ts","sourceRoot":"","sources":["../../../src/util/sasServiceClientCredentials.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAMjE;;GAEG;AACH,qBAAa,2BAA2B;IACtC;;OAEG;IACH,OAAO,CAAC,WAAW,CAAqB;IAExC;;OAEG;IACH,OAAO,CAAC,cAAc,CAAmB;IACzC;;;;OAIG;gBACS,UAAU,EAAE,kBAAkB;YAK5B,kBAAkB;IAMhC;;;;;OAKG;IACG,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;IAiBrE,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;CAGjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sasServiceClientCredentials.js","sourceRoot":"","sources":["../../../src/util/sasServiceClientCredentials.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sasServiceClientCredentials.js","sourceRoot":"","sources":["../../../src/util/sasServiceClientCredentials.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE1D;;GAEG;AACH,MAAM,OAAO,2BAA2B;IAUtC;;;;OAIG;IACH,YAAY,UAA8B;QACxC,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;QAC9B,IAAI,CAAC,cAAc,GAAG,sBAAsB,CAAC,UAAU,CAAC,CAAC;IAC3D,CAAC;IAEO,KAAK,CAAC,kBAAkB,CAAC,SAAiB,EAAE,cAAsB;QACxE,MAAM,YAAY,GAAG,GAAG,SAAS,KAAK,cAAc,EAAE,CAAC;QACvD,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;QACrE,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,WAAW,CAAC,OAAwB;QACxC,IAAI,CAAC,OAAO,CAAC,OAAO;YAAE,OAAO,CAAC,OAAO,GAAG,iBAAiB,EAAE,CAAC;QAE5D,MAAM,SAAS,GAAG,kBAAkB,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;QAE9E,MAAM,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QACxB,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC,CAAC;QACvC,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;QACzD,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;QAC3E,OAAO,CAAC,OAAO,CAAC,GAAG,CACjB,eAAe,EACf,6BAA6B,SAAS,OAAO,cAAc,QAAQ,IAAI,CAAC,WAAW,CAAC,IAAI,OAAO,SAAS,EAAE,CAC3G,CAAC;QACF,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC;QAC/B,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,QAAQ,CAAC,QAAgB;QACvB,OAAO,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAChD,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport type { AccessToken, NamedKeyCredential } from \"@azure/core-auth\";\nimport type { PipelineRequest } from \"@azure/core-rest-pipeline\";\nimport { createHttpHeaders } from \"@azure/core-rest-pipeline\";\nimport { generateKey } from \"./crypto.js\";\nimport type { SasTokenProvider } from \"@azure/core-amqp\";\nimport { createSasTokenProvider } from \"@azure/core-amqp\";\n\n/**\n * @internal\n */\nexport class SasServiceClientCredentials {\n /**\n * The NamedKeyCredential containing the key name and secret key value.\n */\n private _credential: NamedKeyCredential;\n\n /**\n * A SasTokenProvider provides a method to retrieve an `AccessToken`.\n */\n private _tokenProvider: SasTokenProvider;\n /**\n * Creates a new sasServiceClientCredentials object.\n *\n * @param credential - The NamedKeyCredential containing the key name and secret key value.\n */\n constructor(credential: NamedKeyCredential) {\n this._credential = credential;\n this._tokenProvider = createSasTokenProvider(credential);\n }\n\n private async _generateSignature(targetUri: string, expirationDate: number): Promise<string> {\n const stringToSign = `${targetUri}\\n${expirationDate}`;\n const result = await generateKey(this._credential.key, stringToSign);\n return result;\n }\n\n /**\n * Signs a request with the Authentication header.\n *\n * @param request - The {@link PipelineRequest} to be signed.\n * @returns The signed request object.\n */\n async signRequest(request: PipelineRequest): Promise<PipelineRequest> {\n if (!request.headers) request.headers = createHttpHeaders();\n\n const targetUri = encodeURIComponent(request.url.toLowerCase()).toLowerCase();\n\n const date = new Date();\n date.setMinutes(date.getMinutes() + 5);\n const expirationDate = Math.round(date.getTime() / 1000);\n const signature = await this._generateSignature(targetUri, expirationDate);\n request.headers.set(\n \"authorization\",\n `SharedAccessSignature sig=${signature}&se=${expirationDate}&skn=${this._credential.name}&sr=${targetUri}`,\n );\n request.withCredentials = true;\n return request;\n }\n\n getToken(audience: string): Promise<AccessToken> {\n return this._tokenProvider.getToken(audience);\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseUrl.d.ts","sourceRoot":"","sources":["../../../src/util/parseUrl.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parseUrl.d.ts","sourceRoot":"","sources":["../../../src/util/parseUrl.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,QAAQ,WAAY,MAAM,KAAG,GAEzC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseUrl.js","sourceRoot":"","sources":["../../../src/util/parseUrl.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parseUrl.js","sourceRoot":"","sources":["../../../src/util/parseUrl.ts"],"names":[],"mappings":";;;AAAA,uCAAuC;AACvC,kCAAkC;AAClC;;GAEG;AACI,MAAM,QAAQ,GAAG,CAAC,MAAc,EAAO,EAAE;IAC9C,OAAO,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;AACzB,CAAC,CAAC;AAFW,QAAA,QAAQ,YAEnB","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/**\n * @internal\n */\nexport const parseURL = (rawUrl: string): URL => {\n return new URL(rawUrl);\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sasServiceClientCredentials.d.ts","sourceRoot":"","sources":["../../../src/util/sasServiceClientCredentials.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sasServiceClientCredentials.d.ts","sourceRoot":"","sources":["../../../src/util/sasServiceClientCredentials.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAMjE;;GAEG;AACH,qBAAa,2BAA2B;IACtC;;OAEG;IACH,OAAO,CAAC,WAAW,CAAqB;IAExC;;OAEG;IACH,OAAO,CAAC,cAAc,CAAmB;IACzC;;;;OAIG;gBACS,UAAU,EAAE,kBAAkB;YAK5B,kBAAkB;IAMhC;;;;;OAKG;IACG,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;IAiBrE,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;CAGjD"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Copyright (c) Microsoft Corporation.
|
|
3
|
-
// Licensed under the MIT License.
|
|
4
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
3
|
exports.SasServiceClientCredentials = void 0;
|
|
6
4
|
const core_rest_pipeline_1 = require("@azure/core-rest-pipeline");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sasServiceClientCredentials.js","sourceRoot":"","sources":["../../../src/util/sasServiceClientCredentials.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sasServiceClientCredentials.js","sourceRoot":"","sources":["../../../src/util/sasServiceClientCredentials.ts"],"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,eAAe,GAAG,IAAI,CAAC;QAC/B,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,QAAQ,CAAC,QAAgB;QACvB,OAAO,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAChD,CAAC;CACF;AApDD,kEAoDC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport type { AccessToken, NamedKeyCredential } from \"@azure/core-auth\";\nimport type { PipelineRequest } from \"@azure/core-rest-pipeline\";\nimport { createHttpHeaders } from \"@azure/core-rest-pipeline\";\nimport { generateKey } from \"./crypto.js\";\nimport type { SasTokenProvider } from \"@azure/core-amqp\";\nimport { createSasTokenProvider } from \"@azure/core-amqp\";\n\n/**\n * @internal\n */\nexport class SasServiceClientCredentials {\n /**\n * The NamedKeyCredential containing the key name and secret key value.\n */\n private _credential: NamedKeyCredential;\n\n /**\n * A SasTokenProvider provides a method to retrieve an `AccessToken`.\n */\n private _tokenProvider: SasTokenProvider;\n /**\n * Creates a new sasServiceClientCredentials object.\n *\n * @param credential - The NamedKeyCredential containing the key name and secret key value.\n */\n constructor(credential: NamedKeyCredential) {\n this._credential = credential;\n this._tokenProvider = createSasTokenProvider(credential);\n }\n\n private async _generateSignature(targetUri: string, expirationDate: number): Promise<string> {\n const stringToSign = `${targetUri}\\n${expirationDate}`;\n const result = await generateKey(this._credential.key, stringToSign);\n return result;\n }\n\n /**\n * Signs a request with the Authentication header.\n *\n * @param request - The {@link PipelineRequest} to be signed.\n * @returns The signed request object.\n */\n async signRequest(request: PipelineRequest): Promise<PipelineRequest> {\n if (!request.headers) request.headers = createHttpHeaders();\n\n const targetUri = encodeURIComponent(request.url.toLowerCase()).toLowerCase();\n\n const date = new Date();\n date.setMinutes(date.getMinutes() + 5);\n const expirationDate = Math.round(date.getTime() / 1000);\n const signature = await this._generateSignature(targetUri, expirationDate);\n request.headers.set(\n \"authorization\",\n `SharedAccessSignature sig=${signature}&se=${expirationDate}&skn=${this._credential.name}&sr=${targetUri}`,\n );\n request.withCredentials = true;\n return request;\n }\n\n getToken(audience: string): Promise<AccessToken> {\n return this._tokenProvider.getToken(audience);\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseUrl.d.ts","sourceRoot":"","sources":["../../../src/util/parseUrl.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parseUrl.d.ts","sourceRoot":"","sources":["../../../src/util/parseUrl.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,QAAQ,WAAY,MAAM,KAAG,GAEzC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseUrl.js","sourceRoot":"","sources":["../../../src/util/parseUrl.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;
|
|
1
|
+
{"version":3,"file":"parseUrl.js","sourceRoot":"","sources":["../../../src/util/parseUrl.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC;;GAEG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,MAAc,EAAO,EAAE;IAC9C,OAAO,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;AACzB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/**\n * @internal\n */\nexport const parseURL = (rawUrl: string): URL => {\n return new URL(rawUrl);\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sasServiceClientCredentials.d.ts","sourceRoot":"","sources":["../../../src/util/sasServiceClientCredentials.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sasServiceClientCredentials.d.ts","sourceRoot":"","sources":["../../../src/util/sasServiceClientCredentials.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAMjE;;GAEG;AACH,qBAAa,2BAA2B;IACtC;;OAEG;IACH,OAAO,CAAC,WAAW,CAAqB;IAExC;;OAEG;IACH,OAAO,CAAC,cAAc,CAAmB;IACzC;;;;OAIG;gBACS,UAAU,EAAE,kBAAkB;YAK5B,kBAAkB;IAMhC;;;;;OAKG;IACG,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;IAiBrE,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;CAGjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sasServiceClientCredentials.js","sourceRoot":"","sources":["../../../src/util/sasServiceClientCredentials.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sasServiceClientCredentials.js","sourceRoot":"","sources":["../../../src/util/sasServiceClientCredentials.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE1D;;GAEG;AACH,MAAM,OAAO,2BAA2B;IAUtC;;;;OAIG;IACH,YAAY,UAA8B;QACxC,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;QAC9B,IAAI,CAAC,cAAc,GAAG,sBAAsB,CAAC,UAAU,CAAC,CAAC;IAC3D,CAAC;IAEO,KAAK,CAAC,kBAAkB,CAAC,SAAiB,EAAE,cAAsB;QACxE,MAAM,YAAY,GAAG,GAAG,SAAS,KAAK,cAAc,EAAE,CAAC;QACvD,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;QACrE,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,WAAW,CAAC,OAAwB;QACxC,IAAI,CAAC,OAAO,CAAC,OAAO;YAAE,OAAO,CAAC,OAAO,GAAG,iBAAiB,EAAE,CAAC;QAE5D,MAAM,SAAS,GAAG,kBAAkB,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;QAE9E,MAAM,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QACxB,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC,CAAC;QACvC,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;QACzD,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;QAC3E,OAAO,CAAC,OAAO,CAAC,GAAG,CACjB,eAAe,EACf,6BAA6B,SAAS,OAAO,cAAc,QAAQ,IAAI,CAAC,WAAW,CAAC,IAAI,OAAO,SAAS,EAAE,CAC3G,CAAC;QACF,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC;QAC/B,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,QAAQ,CAAC,QAAgB;QACvB,OAAO,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAChD,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport type { AccessToken, NamedKeyCredential } from \"@azure/core-auth\";\nimport type { PipelineRequest } from \"@azure/core-rest-pipeline\";\nimport { createHttpHeaders } from \"@azure/core-rest-pipeline\";\nimport { generateKey } from \"./crypto.js\";\nimport type { SasTokenProvider } from \"@azure/core-amqp\";\nimport { createSasTokenProvider } from \"@azure/core-amqp\";\n\n/**\n * @internal\n */\nexport class SasServiceClientCredentials {\n /**\n * The NamedKeyCredential containing the key name and secret key value.\n */\n private _credential: NamedKeyCredential;\n\n /**\n * A SasTokenProvider provides a method to retrieve an `AccessToken`.\n */\n private _tokenProvider: SasTokenProvider;\n /**\n * Creates a new sasServiceClientCredentials object.\n *\n * @param credential - The NamedKeyCredential containing the key name and secret key value.\n */\n constructor(credential: NamedKeyCredential) {\n this._credential = credential;\n this._tokenProvider = createSasTokenProvider(credential);\n }\n\n private async _generateSignature(targetUri: string, expirationDate: number): Promise<string> {\n const stringToSign = `${targetUri}\\n${expirationDate}`;\n const result = await generateKey(this._credential.key, stringToSign);\n return result;\n }\n\n /**\n * Signs a request with the Authentication header.\n *\n * @param request - The {@link PipelineRequest} to be signed.\n * @returns The signed request object.\n */\n async signRequest(request: PipelineRequest): Promise<PipelineRequest> {\n if (!request.headers) request.headers = createHttpHeaders();\n\n const targetUri = encodeURIComponent(request.url.toLowerCase()).toLowerCase();\n\n const date = new Date();\n date.setMinutes(date.getMinutes() + 5);\n const expirationDate = Math.round(date.getTime() / 1000);\n const signature = await this._generateSignature(targetUri, expirationDate);\n request.headers.set(\n \"authorization\",\n `SharedAccessSignature sig=${signature}&se=${expirationDate}&skn=${this._credential.name}&sr=${targetUri}`,\n );\n request.withCredentials = true;\n return request;\n }\n\n getToken(audience: string): Promise<AccessToken> {\n return this._tokenProvider.getToken(audience);\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseUrl.d.ts","sourceRoot":"","sources":["../../../src/util/parseUrl.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parseUrl.d.ts","sourceRoot":"","sources":["../../../src/util/parseUrl.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,QAAQ,WAAY,MAAM,KAAG,GAEzC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseUrl.js","sourceRoot":"","sources":["../../../src/util/parseUrl.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;
|
|
1
|
+
{"version":3,"file":"parseUrl.js","sourceRoot":"","sources":["../../../src/util/parseUrl.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC;;GAEG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,MAAc,EAAO,EAAE;IAC9C,OAAO,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;AACzB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/**\n * @internal\n */\nexport const parseURL = (rawUrl: string): URL => {\n return new URL(rawUrl);\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sasServiceClientCredentials.d.ts","sourceRoot":"","sources":["../../../src/util/sasServiceClientCredentials.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sasServiceClientCredentials.d.ts","sourceRoot":"","sources":["../../../src/util/sasServiceClientCredentials.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAMjE;;GAEG;AACH,qBAAa,2BAA2B;IACtC;;OAEG;IACH,OAAO,CAAC,WAAW,CAAqB;IAExC;;OAEG;IACH,OAAO,CAAC,cAAc,CAAmB;IACzC;;;;OAIG;gBACS,UAAU,EAAE,kBAAkB;YAK5B,kBAAkB;IAMhC;;;;;OAKG;IACG,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;IAiBrE,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;CAGjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sasServiceClientCredentials.js","sourceRoot":"","sources":["../../../src/util/sasServiceClientCredentials.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sasServiceClientCredentials.js","sourceRoot":"","sources":["../../../src/util/sasServiceClientCredentials.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM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AAO,SAAS,EAAE,CAC3G,CAAC;QACF,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC;QAC/B,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,QAAQ,CAAC,QAAgB;QACvB,OAAO,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAChD,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport type { AccessToken, NamedKeyCredential } from \"@azure/core-auth\";\nimport type { PipelineRequest } from \"@azure/core-rest-pipeline\";\nimport { createHttpHeaders } from \"@azure/core-rest-pipeline\";\nimport { generateKey } from \"./crypto.js\";\nimport type { SasTokenProvider } from \"@azure/core-amqp\";\nimport { createSasTokenProvider } from \"@azure/core-amqp\";\n\n/**\n * @internal\n */\nexport class SasServiceClientCredentials {\n /**\n * The NamedKeyCredential containing the key name and secret key value.\n */\n private _credential: NamedKeyCredential;\n\n /**\n * A SasTokenProvider provides a method to retrieve an `AccessToken`.\n */\n private _tokenProvider: SasTokenProvider;\n /**\n * Creates a new sasServiceClientCredentials object.\n *\n * @param credential - The NamedKeyCredential containing the key name and secret key value.\n */\n constructor(credential: NamedKeyCredential) {\n this._credential = credential;\n this._tokenProvider = createSasTokenProvider(credential);\n }\n\n private async _generateSignature(targetUri: string, expirationDate: number): Promise<string> {\n const stringToSign = `${targetUri}\\n${expirationDate}`;\n const result = await generateKey(this._credential.key, stringToSign);\n return result;\n }\n\n /**\n * Signs a request with the Authentication header.\n *\n * @param request - The {@link PipelineRequest} to be signed.\n * @returns The signed request object.\n */\n async signRequest(request: PipelineRequest): Promise<PipelineRequest> {\n if (!request.headers) request.headers = createHttpHeaders();\n\n const targetUri = encodeURIComponent(request.url.toLowerCase()).toLowerCase();\n\n const date = new Date();\n date.setMinutes(date.getMinutes() + 5);\n const expirationDate = Math.round(date.getTime() / 1000);\n const signature = await this._generateSignature(targetUri, expirationDate);\n request.headers.set(\n \"authorization\",\n `SharedAccessSignature sig=${signature}&se=${expirationDate}&skn=${this._credential.name}&sr=${targetUri}`,\n );\n request.withCredentials = true;\n return request;\n }\n\n getToken(audience: string): Promise<AccessToken> {\n return this._tokenProvider.getToken(audience);\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@azure/service-bus",
|
|
3
3
|
"sdk-type": "client",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
|
-
"version": "7.10.0-alpha.
|
|
5
|
+
"version": "7.10.0-alpha.20250124.2",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"description": "Azure Service Bus SDK for JavaScript",
|
|
8
8
|
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/servicebus/service-bus/",
|