{"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.\n// Licensed under the MIT license.\n\nimport {\n    ArgumentNullError,\n} from \"../common/Exports.js\";\nimport { HeaderNames } from \"./HeaderNames.js\";\nimport {\n    AuthInfo,\n    IAuthentication\n} from \"./IAuthentication.js\";\n\n/**\n * @class\n */\nexport class CognitiveSubscriptionKeyAuthentication implements IAuthentication {\n    private privAuthInfo: AuthInfo;\n\n    /**\n     * Creates and initializes an instance of the CognitiveSubscriptionKeyAuthentication class.\n     * @constructor\n     * @param {string} subscriptionKey - The subscription key\n     */\n    public constructor(subscriptionKey: string) {\n        if (!subscriptionKey) {\n            throw new ArgumentNullError(\"subscriptionKey\");\n        }\n\n        this.privAuthInfo = new AuthInfo(HeaderNames.AuthKey, subscriptionKey);\n    }\n\n    /**\n     * Fetches the subscription key.\n     * @member\n     * @function\n     * @public\n     * @param {string} authFetchEventId - The id to fetch.\n     */\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    public fetch(authFetchEventId: string): Promise<AuthInfo> {\n        return Promise.resolve(this.privAuthInfo);\n    }\n\n    /**\n     * Fetches the subscription key.\n     * @member\n     * @function\n     * @public\n     * @param {string} authFetchEventId - The id to fetch.\n     */\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    public fetchOnExpiry(authFetchEventId: string): Promise<AuthInfo> {\n        return Promise.resolve(this.privAuthInfo);\n    }\n}\n"]}