@databricks/sql
Version:
Driver for connection to Databricks SQL via Thrift API.
19 lines • 789 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
class PlainHttpAuthentication {
constructor(options) {
var _a;
this.context = options.context;
this.username = (options === null || options === void 0 ? void 0 : options.username) || 'anonymous';
this.password = (_a = options === null || options === void 0 ? void 0 : options.password) !== null && _a !== void 0 ? _a : 'anonymous';
this.headers = (options === null || options === void 0 ? void 0 : options.headers) || {};
}
async authenticate() {
return {
...this.headers,
Authorization: `Bearer ${this.password}`,
};
}
}
exports.default = PlainHttpAuthentication;
//# sourceMappingURL=PlainHttpAuthentication.js.map
;