UNPKG

lightstep-tracer

Version:

> ❗ **This instrumentation is no longer recommended**. Please review [documentation on setting up and configuring the OpenTelemetry Node.js Launcher](https://github.com/lightstep/otel-launcher-node) or [OpenTelemetry JS (Browser)](https://github.com/open-

48 lines (36 loc) 1.75 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _platform_abstraction_layer = require("../platform_abstraction_layer"); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } var AuthImp = /*#__PURE__*/function () { function AuthImp(accessToken) { _classCallCheck(this, AuthImp); this._accessToken = accessToken; } _createClass(AuthImp, [{ key: "getAccessToken", value: function getAccessToken() { if (typeof this._accessToken === 'undefined' || this._accessToken === null || this._accessToken.length === 0) { return 'empty'; } return this._accessToken; } }, { key: "toThrift", value: function toThrift() { // eslint-disable-next-line camelcase return new _platform_abstraction_layer.crouton_thrift.Auth({ access_token: this._accessToken }); } }]); return AuthImp; }(); exports["default"] = AuthImp; module.exports = exports.default; //# sourceMappingURL=auth_imp.js.map