UNPKG

1.09 kBJavaScriptView Raw
1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the MIT License. See License.txt in the project root for license information.
3import { __extends } from "tslib";
4import { ApiKeyCredentials } from "./apiKeyCredentials";
5var DomainCredentials = /** @class */ (function (_super) {
6 __extends(DomainCredentials, _super);
7 /**
8 * Creates a new EventGrid DomainCredentials object.
9 *
10 * @constructor
11 * @param {string} domainKey The EventGrid domain key
12 */
13 function DomainCredentials(domainKey) {
14 var _this = this;
15 if (!domainKey || (domainKey && typeof domainKey !== "string")) {
16 throw new Error("domainKey cannot be null or undefined and must be of type string.");
17 }
18 var options = {
19 inHeader: {
20 "aeg-sas-key": domainKey,
21 },
22 };
23 _this = _super.call(this, options) || this;
24 return _this;
25 }
26 return DomainCredentials;
27}(ApiKeyCredentials));
28export { DomainCredentials };
29//# sourceMappingURL=domainCredentials.js.map
\No newline at end of file