UNPKG

@esri/arcgis-rest-auth

Version:

Authentication helpers for @esri/arcgis-rest-js.

23 lines 581 B
/* Copyright (c) 2017-2019 Environmental Systems Research Institute, Inc. * Apache-2.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; }()); export { ApiKey }; //# sourceMappingURL=ApiKey.js.map