botframework-connector
Version:
Bot Connector is autorest generated connector client.
37 lines • 1.54 kB
JavaScript
;
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.TokenApiClientContext = void 0;
const core_http_1 = require("@azure/core-http");
const packageName = "botframework-Token";
const packageVersion = "4.0.0";
class TokenApiClientContext extends core_http_1.ServiceClient {
/**
* Initializes a new instance of the TokenApiClientContext class.
* @param credentials Subscription credentials which uniquely identify client subscription.
* @param [options] The parameter options
*/
constructor(credentials, options) {
if (credentials === null || credentials === undefined) {
throw new Error('\'credentials\' cannot be null.');
}
if (!options) {
options = {};
}
const defaultUserAgent = (0, core_http_1.getDefaultUserAgentValue)();
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent} ${options.userAgent || ''}`;
super(credentials, options);
this.baseUri = options.baseUri || this.baseUri || "https://token.botframework.com";
this.requestContentType = "application/json; charset=utf-8";
this.credentials = credentials;
}
// Protects against JSON.stringify leaking secrets
toJSON() {
return { name: this.constructor.name };
}
}
exports.TokenApiClientContext = TokenApiClientContext;
//# sourceMappingURL=tokenApiClientContext.js.map