@esri/arcgis-rest-auth
Version:
Authentication helpers for @esri/arcgis-rest-js.
26 lines • 689 B
JavaScript
;
/* Copyright (c) 2017-2019 Environmental Systems Research Institute, Inc.
* Apache-2.0 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.ApiKey = void 0;
/**
* ```js
* import { ApiKey } from '@esri/arcgis-rest-auth';
* const apiKey = new ApiKey("...");
* ```
* Used to authenticate with API Keys.
*/
var ApiKey = /** @class */ (function () {
function ApiKey(options) {
this.key = options.key;
}
/**
* Gets a token (the API Key).
*/
ApiKey.prototype.getToken = function (url) {
return Promise.resolve(this.key);
};
return ApiKey;
}());
exports.ApiKey = ApiKey;
//# sourceMappingURL=ApiKey.js.map