37 lines
No EOL
1.5 KiB
JavaScript
37 lines
No EOL
1.5 KiB
JavaScript
"use strict";
|
|
/**
|
|
* 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
|