{"version":3,"sources":["src/common.speech/CognitiveSubscriptionKeyAuthentication.ts"],"names":[],"mappings":"AAOA,OAAO,EACH,QAAQ,EACR,eAAe,EAClB,MAAM,sBAAsB,CAAC;AAE9B;;GAEG;AACH,qBAAa,sCAAuC,YAAW,eAAe;IAC1E,OAAO,CAAC,YAAY,CAAW;IAE/B;;;;OAIG;gBACgB,eAAe,EAAE,MAAM;IAQ1C;;;;;;OAMG;IAEI,KAAK,CAAC,gBAAgB,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;IAIzD;;;;;;OAMG;IAEI,aAAa,CAAC,gBAAgB,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;CAGpE","file":"CognitiveSubscriptionKeyAuthentication.d.ts","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT license.\r\n\r\nimport {\r\n    ArgumentNullError,\r\n} from \"../common/Exports.js\";\r\nimport { HeaderNames } from \"./HeaderNames.js\";\r\nimport {\r\n    AuthInfo,\r\n    IAuthentication\r\n} from \"./IAuthentication.js\";\r\n\r\n/**\r\n * @class\r\n */\r\nexport class CognitiveSubscriptionKeyAuthentication implements IAuthentication {\r\n    private privAuthInfo: AuthInfo;\r\n\r\n    /**\r\n     * Creates and initializes an instance of the CognitiveSubscriptionKeyAuthentication class.\r\n     * @constructor\r\n     * @param {string} subscriptionKey - The subscription key\r\n     */\r\n    public constructor(subscriptionKey: string) {\r\n        if (!subscriptionKey) {\r\n            throw new ArgumentNullError(\"subscriptionKey\");\r\n        }\r\n\r\n        this.privAuthInfo = new AuthInfo(HeaderNames.AuthKey, subscriptionKey);\r\n    }\r\n\r\n    /**\r\n     * Fetches the subscription key.\r\n     * @member\r\n     * @function\r\n     * @public\r\n     * @param {string} authFetchEventId - The id to fetch.\r\n     */\r\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n    public fetch(authFetchEventId: string): Promise<AuthInfo> {\r\n        return Promise.resolve(this.privAuthInfo);\r\n    }\r\n\r\n    /**\r\n     * Fetches the subscription key.\r\n     * @member\r\n     * @function\r\n     * @public\r\n     * @param {string} authFetchEventId - The id to fetch.\r\n     */\r\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n    public fetchOnExpiry(authFetchEventId: string): Promise<AuthInfo> {\r\n        return Promise.resolve(this.privAuthInfo);\r\n    }\r\n}\r\n"]}