@esri/arcgis-rest-auth 3.4.3 → 4.0.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/.ultra.cache.json +1 -0
  2. package/CHANGELOG.md +125 -0
  3. package/README.md +5 -5
  4. package/dist/bundled/auth.esm.js +7 -0
  5. package/dist/bundled/auth.esm.js.map +1 -0
  6. package/dist/bundled/auth.esm.min.js +7 -0
  7. package/dist/bundled/auth.esm.min.js.map +1 -0
  8. package/dist/bundled/auth.umd.js +104 -0
  9. package/dist/bundled/auth.umd.js.map +1 -0
  10. package/dist/bundled/auth.umd.min.js +7 -0
  11. package/dist/bundled/auth.umd.min.js.map +1 -0
  12. package/dist/cjs/index.js +19 -0
  13. package/dist/cjs/index.js.map +1 -0
  14. package/dist/cjs/package.json +3 -0
  15. package/dist/esm/index.d.ts +4 -9
  16. package/dist/esm/index.js +1 -8
  17. package/dist/esm/index.js.map +1 -1
  18. package/dist/esm/package.json +3 -0
  19. package/package.json +44 -45
  20. package/src/index.ts +32 -0
  21. package/tsconfig.json +6 -0
  22. package/dist/esm/ApiKey.d.ts +0 -26
  23. package/dist/esm/ApiKey.js +0 -23
  24. package/dist/esm/ApiKey.js.map +0 -1
  25. package/dist/esm/ApplicationSession.d.ts +0 -60
  26. package/dist/esm/ApplicationSession.js +0 -59
  27. package/dist/esm/ApplicationSession.js.map +0 -1
  28. package/dist/esm/UserSession.d.ts +0 -496
  29. package/dist/esm/UserSession.js +0 -903
  30. package/dist/esm/UserSession.js.map +0 -1
  31. package/dist/esm/app-tokens.d.ts +0 -87
  32. package/dist/esm/app-tokens.js +0 -104
  33. package/dist/esm/app-tokens.js.map +0 -1
  34. package/dist/esm/authenticated-request-options.d.ts +0 -18
  35. package/dist/esm/authenticated-request-options.js +0 -3
  36. package/dist/esm/authenticated-request-options.js.map +0 -1
  37. package/dist/esm/federation-utils.d.ts +0 -5
  38. package/dist/esm/federation-utils.js +0 -59
  39. package/dist/esm/federation-utils.js.map +0 -1
  40. package/dist/esm/fetch-token.d.ts +0 -9
  41. package/dist/esm/fetch-token.js +0 -23
  42. package/dist/esm/fetch-token.js.map +0 -1
  43. package/dist/esm/generate-token.d.ts +0 -7
  44. package/dist/esm/generate-token.js +0 -17
  45. package/dist/esm/generate-token.js.map +0 -1
  46. package/dist/esm/validate-app-access.d.ts +0 -47
  47. package/dist/esm/validate-app-access.js +0 -52
  48. package/dist/esm/validate-app-access.js.map +0 -1
  49. package/dist/node/ApiKey.js +0 -26
  50. package/dist/node/ApiKey.js.map +0 -1
  51. package/dist/node/ApplicationSession.js +0 -62
  52. package/dist/node/ApplicationSession.js.map +0 -1
  53. package/dist/node/UserSession.js +0 -906
  54. package/dist/node/UserSession.js.map +0 -1
  55. package/dist/node/app-tokens.js +0 -109
  56. package/dist/node/app-tokens.js.map +0 -1
  57. package/dist/node/authenticated-request-options.js +0 -5
  58. package/dist/node/authenticated-request-options.js.map +0 -1
  59. package/dist/node/federation-utils.js +0 -67
  60. package/dist/node/federation-utils.js.map +0 -1
  61. package/dist/node/fetch-token.js +0 -27
  62. package/dist/node/fetch-token.js.map +0 -1
  63. package/dist/node/generate-token.js +0 -21
  64. package/dist/node/generate-token.js.map +0 -1
  65. package/dist/node/index.js +0 -14
  66. package/dist/node/index.js.map +0 -1
  67. package/dist/node/validate-app-access.js +0 -56
  68. package/dist/node/validate-app-access.js.map +0 -1
  69. package/dist/umd/auth.umd.js +0 -1266
  70. package/dist/umd/auth.umd.js.map +0 -1
  71. package/dist/umd/auth.umd.min.js +0 -7
  72. package/dist/umd/auth.umd.min.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"files":{"dist":"1647976333249.6528","CHANGELOG.md":"71552aef7a6e09246eb4ed0930715c06fdb015f1","README.md":"9a12530bdf570733e0133530d2c2bb2eb99c316b","package.json":"403dfcf6a5da3ef988c545d5847840e8252f331d","src/index.ts":"de3c4a3ed52582e32db55bd6043d47a10f43a490","tsconfig.json":"90cbf37afa22bf149841064433be84fbb7e8f5e8"},"deps":{"@esri/arcgis-rest-request":1647976332585.6575}}
package/CHANGELOG.md ADDED
@@ -0,0 +1,125 @@
1
+ # @esri/arcgis-rest-auth [4.0.0-beta.4](https://github.com/Esri/arcgis-rest-js/compare/@esri/arcgis-rest-auth@4.0.0-beta.3...@esri/arcgis-rest-auth@4.0.0-beta.4) (2022-03-22)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **arcgis-rest-request:** add support for server credentials ([#965](https://github.com/Esri/arcgis-rest-js/issues/965)) ([b063bcc](https://github.com/Esri/arcgis-rest-js/commit/b063bcca1780cd671e6b4f25532e4122903dc8b2))
7
+
8
+
9
+
10
+
11
+
12
+ ### Dependencies
13
+
14
+ * **@esri/arcgis-rest-request:** upgraded to 4.0.0-beta.6
15
+
16
+ # @esri/arcgis-rest-auth [4.0.0-beta.3](https://github.com/Esri/arcgis-rest-js/compare/@esri/arcgis-rest-auth@4.0.0-beta.2...@esri/arcgis-rest-auth@4.0.0-beta.3) (2022-03-10)
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * add package.json files to builds for individual build types ([#955](https://github.com/Esri/arcgis-rest-js/issues/955)) ([c162125](https://github.com/Esri/arcgis-rest-js/commit/c16212594f0b914425548be5d61d7435d54a2718))
22
+
23
+
24
+
25
+
26
+
27
+ ### Dependencies
28
+
29
+ * **@esri/arcgis-rest-request:** upgraded to 4.0.0-beta.3
30
+
31
+ # @esri/arcgis-rest-auth [4.0.0-beta.2](https://github.com/Esri/arcgis-rest-js/compare/@esri/arcgis-rest-auth@4.0.0-beta.1...@esri/arcgis-rest-auth@4.0.0-beta.2) (2022-03-02)
32
+
33
+
34
+ ### Features
35
+
36
+ * **arcgis-rest-request:** rewrite oauth 2 functions to use PKCE ([e49f88c](https://github.com/Esri/arcgis-rest-js/commit/e49f88c700694aed472733527124c4d0d54e45d6))
37
+
38
+
39
+
40
+
41
+
42
+ ### Dependencies
43
+
44
+ * **@esri/arcgis-rest-request:** upgraded to 4.0.0-beta.2
45
+
46
+ # @esri/arcgis-rest-auth 1.0.0-beta.1 (2022-02-17)
47
+
48
+
49
+ ### Bug Fixes
50
+
51
+ * switch to eslint, fix minor issues, disable other rules ([ab47412](https://github.com/Esri/arcgis-rest-js/commit/ab474123d3a056dcd52a8898f39f287893626f35))
52
+ * **arcgis-rest-auth:** export validateAppAccess ([6d1e2ef](https://github.com/Esri/arcgis-rest-js/commit/6d1e2ef012ca25464e6219b5d909a30e5f1cecee))
53
+ * **arcgis-rest-auth:** postMessage internals ([bd8eb6c](https://github.com/Esri/arcgis-rest-js/commit/bd8eb6c0363483209645c5cc7cf19ad1a8114cc6))
54
+ * **UserSession:** remove /sharing/rest from server url during postMessage auth ([04fcdbd](https://github.com/Esri/arcgis-rest-js/commit/04fcdbd5307c79e55610a1bb7e049e3e18f0f0cc))
55
+ * **UserSession:** switch "duration" to "expiration" in IOAuth2Options ([#847](https://github.com/Esri/arcgis-rest-js/issues/847)) ([392f5bb](https://github.com/Esri/arcgis-rest-js/commit/392f5bb74b2461e7bd34dd16e784fce415d554ec)), closes [#843](https://github.com/Esri/arcgis-rest-js/issues/843)
56
+ * ensure platformSelf sends cookie ([29e33cb](https://github.com/Esri/arcgis-rest-js/commit/29e33cb9b9d0a2e25e412106adb06ff054bd5737))
57
+ * export app-tokens ([0171204](https://github.com/Esri/arcgis-rest-js/commit/017120498b32c9322689ad539b216ce8e5c96a3a))
58
+ * export validateAppAccess function ([b087de2](https://github.com/Esri/arcgis-rest-js/commit/b087de24ae6d8f41a2bb13c3c25a33943f0db2d8))
59
+ * platformSelf to send cookies and append f=json in url ([ed81919](https://github.com/Esri/arcgis-rest-js/commit/ed819194da74075172ff26139f2db4491d79ed12))
60
+ * update IPlatformSelfResponse to include expires_in ([dd3557b](https://github.com/Esri/arcgis-rest-js/commit/dd3557b19514a33150db2f15138422bb219681e7))
61
+ * **:bug::** ensure fix session.portal url when cred.server contains sharing/rest ([815de49](https://github.com/Esri/arcgis-rest-js/commit/815de49549b35aa9d255de6b05c2beb2d153f37f))
62
+ * **:bug::** ensure that the same referer is set in Node.js applications that is passed along in toke ([afaa564](https://github.com/Esri/arcgis-rest-js/commit/afaa5646bffbeec462a733d9b6e021d6499c0be7))
63
+ * **:bug::** treat ArcGIS Online orgs as equivalent to arcgis.com when testing a portal ([18c3a7f](https://github.com/Esri/arcgis-rest-js/commit/18c3a7fcc774bad8e2cc9eef15444b62c1ed0dd1)), closes [#233](https://github.com/Esri/arcgis-rest-js/issues/233)
64
+ * **:closed_lock_with_key::** expose option to customize expiration of ApplicationSession tokens ([5af14d7](https://github.com/Esri/arcgis-rest-js/commit/5af14d7b10ccee179f7b2da82f4f1478352a8b67)), closes [#314](https://github.com/Esri/arcgis-rest-js/issues/314)
65
+ * **arcgis-rest-auth:** enable oAuth from within an IFrame ([e6538d5](https://github.com/Esri/arcgis-rest-js/commit/e6538d5d38c9b2d0f31c6392d257f0d9263170bd)), closes [#711](https://github.com/Esri/arcgis-rest-js/issues/711)
66
+ * **arcgis-rest-auth:** ensure that mixed casing of federated server urls does not break the system ([07c92f5](https://github.com/Esri/arcgis-rest-js/commit/07c92f559cc0288fa379d19464f88642c6fe2803))
67
+ * **auth:** add additional authentication providers ([85f73b2](https://github.com/Esri/arcgis-rest-js/commit/85f73b22c17a3a3ae72b559a63df2aef8297828c))
68
+ * **auth:** allow trailing slash in portal URL ([b76da90](https://github.com/Esri/arcgis-rest-js/commit/b76da902d67d4ac3635ac18eb780e7c68d7617f7))
69
+ * **auth:** better regex match for usernames ([d38a7fb](https://github.com/Esri/arcgis-rest-js/commit/d38a7fb0e1bff3c49a135bc10be74893ec60a1e9))
70
+ * **auth:** decode username when parsing response from OAuth ([e0c2a44](https://github.com/Esri/arcgis-rest-js/commit/e0c2a44bd5032ce9b45b0f8511e9cc256056872c)), closes [#165](https://github.com/Esri/arcgis-rest-js/issues/165)
71
+ * **auth:** improve query and error handling when completing sign in ([4b3905c](https://github.com/Esri/arcgis-rest-js/commit/4b3905ca6517443c9237a44c0fc3249e579db8f5))
72
+ * **auth:** use www.arcgis.com consistently ([a7dc28d](https://github.com/Esri/arcgis-rest-js/commit/a7dc28d9fe860f380ed57137bcafe73ab0bb5e9d)), closes [#223](https://github.com/Esri/arcgis-rest-js/issues/223)
73
+ * **enterprise:** fetch fresh token manually when u/pw are provided ([299f3c0](https://github.com/Esri/arcgis-rest-js/commit/299f3c0da043b74113310cba9a3e9a0f77afa921)), closes [#161](https://github.com/Esri/arcgis-rest-js/issues/161)
74
+ * **lock:** pass through url and options for non-federated requests ([802006c](https://github.com/Esri/arcgis-rest-js/commit/802006cdc68e69851e80c499a236ba4c8fa1cb6f))
75
+ * **oauth:** check for window parent correctly in ouath without popup ([a27bb7d](https://github.com/Esri/arcgis-rest-js/commit/a27bb7da5fa5de7ddfbc2d676b707bfa1780ecbf))
76
+ * **oAuth:** fix oAuth2 methods in IE 11 and Edge ([462f980](https://github.com/Esri/arcgis-rest-js/commit/462f980082f9eeb8c55b5aa6c5981422ae40105f))
77
+ * **OAuth2 options:** added locale and state parameters for browser based OAuth2 ([b05996e](https://github.com/Esri/arcgis-rest-js/commit/b05996e83b1836f9a27337939a9a681d41207504))
78
+ * **portal:** fetch tokens for rest admin requests to services federated with ArcGIS Enterprise too ([79dda00](https://github.com/Esri/arcgis-rest-js/commit/79dda000e9cc3d8cf270ab3ace65d70d20d5ac57)), closes [#329](https://github.com/Esri/arcgis-rest-js/issues/329)
79
+ * **release:** resolve issues from accidental 1.0.1 release. ([ddd3d6c](https://github.com/Esri/arcgis-rest-js/commit/ddd3d6cab0fb0d789da866cea07244b7a170d9fd))
80
+ * **release-automation:** fix issues found in https://github.com/Esri/arcgis-rest-js/pull/80. ([3b42fe9](https://github.com/Esri/arcgis-rest-js/commit/3b42fe9969cc2f6a21428692c72ada8ffffb59a6))
81
+ * **release-automation:** fix issues uncovered by 1st release ([a73b76f](https://github.com/Esri/arcgis-rest-js/commit/a73b76f58843d538d8b29b1ae60a72a9f57ac5ec))
82
+ * **sharing:** ensure internal sharing metadata calls pass through custom request options ([e70a10d](https://github.com/Esri/arcgis-rest-js/commit/e70a10d5bbd6ac4fecf61f9f635b01cf9c8c5034)), closes [#276](https://github.com/Esri/arcgis-rest-js/issues/276)
83
+ * **sharing:** rework group membership checking, fix UserSession.getUser scope issue ([909a37e](https://github.com/Esri/arcgis-rest-js/commit/909a37ec2f928ad223c674ae0d4033e24761ae9a))
84
+ * **try:** try an anonymous request before throwing an auth error ([9209035](https://github.com/Esri/arcgis-rest-js/commit/9209035072b54bf68425ee9737e2a15010ac1b33))
85
+ * **UserSession:** throw ArcGISAuthError instead of Error when unable to refresh a token ([8854765](https://github.com/Esri/arcgis-rest-js/commit/88547656ce88786e2dcac8e8e0e78045b67e8e16)), closes [#56](https://github.com/Esri/arcgis-rest-js/issues/56)
86
+ * **UserSession:** will now update expired tokens on non-federated servers ([af121c1](https://github.com/Esri/arcgis-rest-js/commit/af121c1de1c96027a2ca107ed46a7877b61c5a4f))
87
+
88
+
89
+ ### Code Refactoring
90
+
91
+ * change casing of IOauth2Options to IOAuth2Options ([9ffd227](https://github.com/Esri/arcgis-rest-js/commit/9ffd2277055864d5257cb7a6c9913c70079e7da5))
92
+ * deprecate common-types package (in favor of common) ([6ab2e75](https://github.com/Esri/arcgis-rest-js/commit/6ab2e75a3b57ce77391da7f2a16ab57a3e781000))
93
+
94
+
95
+ ### Features
96
+
97
+ * **:snowman::** add basic support for accessing secure non-federated services ([fc2f06b](https://github.com/Esri/arcgis-rest-js/commit/fc2f06b74a40261ae9b6bb959048d353be02153b)), closes [#174](https://github.com/Esri/arcgis-rest-js/issues/174)
98
+ * **:unlock::** add support for an OAuth flow that triggers social media login automatically ([2e582e1](https://github.com/Esri/arcgis-rest-js/commit/2e582e12fc3e5bf9688b3ba80da33e4a5a5fa84f)), closes [#239](https://github.com/Esri/arcgis-rest-js/issues/239)
99
+ * **all packages:** start shipping an unminified UMD for each package ([52043f5](https://github.com/Esri/arcgis-rest-js/commit/52043f5b702aca699f62abf8054582286e258ba5)), closes [#135](https://github.com/Esri/arcgis-rest-js/issues/135)
100
+ * **ApplicationSession:** only allow 1 pending request for a new token at a time ([4e6f9e2](https://github.com/Esri/arcgis-rest-js/commit/4e6f9e27d561566449ef2338b078f44d0e3b65b5))
101
+ * **arcgis-rest-auth:** add postMessage auth support ([a6b8a17](https://github.com/Esri/arcgis-rest-js/commit/a6b8a17a265339725a8c5dfd90e408f28a035787))
102
+ * **arcgis-rest-auth:** add validateAppAccess function and UserSession method ([2478ea5](https://github.com/Esri/arcgis-rest-js/commit/2478ea56d43302d3f7fab6ffd38a9d2c609bb510))
103
+ * **arcgis-rest-auth:** reduce postMessageAuth query params ([154515f](https://github.com/Esri/arcgis-rest-js/commit/154515f66a4eedb9ee83dd8528549db55e268871))
104
+ * **auth:** add getCredential() method to UserSession for jsapi ([c03430d](https://github.com/Esri/arcgis-rest-js/commit/c03430d4d5b93d983c9cab39117a5623113425e8)), closes [#208](https://github.com/Esri/arcgis-rest-js/issues/208)
105
+ * **auth:** add reflexive method to instantiate UserSession from jsapi auth ([ea64da9](https://github.com/Esri/arcgis-rest-js/commit/ea64da92c74c3a9b6671e66872070372db46cd72)), closes [#208](https://github.com/Esri/arcgis-rest-js/issues/208)
106
+ * **caring:** methods to un/share items with groups ([8572bb0](https://github.com/Esri/arcgis-rest-js/commit/8572bb0ab0222e4f0eedbe9cfd4ff00c160f0c77))
107
+ * **request:** adds option to return the raw fetch response ([6fb7c79](https://github.com/Esri/arcgis-rest-js/commit/6fb7c792f4aab585a06bb1178b41a8687eabc419)), closes [#462](https://github.com/Esri/arcgis-rest-js/issues/462)
108
+ * **UserSession:** added optional 'popupWindowFeatures' to 'IOAuth2Options' ([f96a581](https://github.com/Esri/arcgis-rest-js/commit/f96a581033513c9a546998bc37254a46e364f153))
109
+ * **UserSession:** multiple requests to getToken for similar URLs now return the same Promise ([751e5f1](https://github.com/Esri/arcgis-rest-js/commit/751e5f19d2e6fac184a0a17cc216c54cc5c1e9f2))
110
+ * **UserSession:** rename refreshTokenDuration to refreshTokenTTL ([a6406d4](https://github.com/Esri/arcgis-rest-js/commit/a6406d4d10308b266fd7ddcc6168f32419f206aa))
111
+ * **util:** add getUserUrl method to auth package ([d742b34](https://github.com/Esri/arcgis-rest-js/commit/d742b343130a8a0d5baaf9391ac48f5c5c334c6d))
112
+
113
+
114
+ ### BREAKING CHANGES
115
+
116
+ * deprecate common-types package (in favor of common)
117
+ * change casing of IOauth2Options to IOAuth2Options
118
+
119
+
120
+
121
+
122
+
123
+ ### Dependencies
124
+
125
+ * **@esri/arcgis-rest-request:** upgraded to 1.0.0-beta.1
package/README.md CHANGED
@@ -8,7 +8,7 @@
8
8
  [npm-url]: https://www.npmjs.com/package/@esri/arcgis-rest-auth
9
9
  [travis-img]: https://img.shields.io/travis/Esri/arcgis-rest-js/master.svg?style=flat-square
10
10
  [travis-url]: https://travis-ci.org/Esri/arcgis-rest-js
11
- [gzip-image]: https://img.badgesize.io/https://unpkg.com/@esri/arcgis-rest-auth/dist/umd/auth.umd.min.js?compression=gzip
11
+ [gzip-image]: https://img.badgesize.io/https://unpkg.com/@esri/arcgis-rest-auth/dist/bundled/auth.umd.min.js?compression=gzip
12
12
  [coverage-img]: https://codecov.io/gh/Esri/arcgis-rest-js/branch/master/graph/badge.svg
13
13
  [coverage-url]: https://codecov.io/gh/Esri/arcgis-rest-js
14
14
 
@@ -24,11 +24,11 @@ npm install @esri/arcgis-rest-auth
24
24
  ```
25
25
 
26
26
  ```js
27
- import { UserSession } from '@esri/arcgis-rest-auth';
27
+ import { UserSession } from "@esri/arcgis-rest-auth";
28
28
 
29
29
  const session = new UserSession({
30
- username: "casey",
31
- password: "123456"
30
+ username: "casey",
31
+ password: "123456"
32
32
  });
33
33
  ```
34
34
 
@@ -36,7 +36,7 @@ const session = new UserSession({
36
36
 
37
37
  ### Issues
38
38
 
39
- If something isn't working the way you expected, please take a look at [previously logged issues](https://github.com/Esri/arcgis-rest-js/issues) first. Have you found a new bug? Want to request a new feature? We'd [**love**](https://github.com/Esri/arcgis-rest-js/issues/new) to hear from you.
39
+ If something isn't working the way you expected, please take a look at [previously logged issues](https://github.com/Esri/arcgis-rest-js/issues) first. Have you found a new bug? Want to request a new feature? We'd [**love**](https://github.com/Esri/arcgis-rest-js/issues/new) to hear from you.
40
40
 
41
41
  If you're looking for help you can also post issues on [GIS Stackexchange](http://gis.stackexchange.com/questions/ask?tags=esri-oss).
42
42
 
@@ -0,0 +1,7 @@
1
+ /* @preserve
2
+ * @esri/arcgis-rest-auth - v4.0.0-beta.5 - Apache-2.0
3
+ * Copyright (c) 2017-2022 Esri, Inc.
4
+ * Tue Mar 22 2022 19:12:13 GMT+0000 (Coordinated Universal Time)
5
+ */
6
+ export { ApiKey, ApplicationSession, AuthenticationProvider, IApiKeyOptions, IAppAccess, IAuthenticatedRequestOptions, ICredential, IFetchTokenResponse, IOAuth2Options, IPlatformSelfResponse, IUser, IUserRequestOptions, UserSession, canUseOnlineToken, exchangeToken, fetchToken, getOnlineEnvironment, isFederated, isOnline, normalizeOnlinePortalUrl, platformSelf, validateAppAccess } from '@esri/arcgis-rest-request';
7
+ //# sourceMappingURL=auth.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -0,0 +1,7 @@
1
+ /* @preserve
2
+ * @esri/arcgis-rest-auth - v4.0.0-beta.5 - Apache-2.0
3
+ * Copyright (c) 2017-2022 Esri, Inc.
4
+ * Tue Mar 22 2022 19:12:13 GMT+0000 (Coordinated Universal Time)
5
+ */
6
+ export{ApiKey,ApplicationSession,AuthenticationProvider,IApiKeyOptions,IAppAccess,IAuthenticatedRequestOptions,ICredential,IFetchTokenResponse,IOAuth2Options,IPlatformSelfResponse,IUser,IUserRequestOptions,UserSession,canUseOnlineToken,exchangeToken,fetchToken,getOnlineEnvironment,isFederated,isOnline,normalizeOnlinePortalUrl,platformSelf,validateAppAccess}from"@esri/arcgis-rest-request";
7
+ //# sourceMappingURL=auth.esm.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.esm.min.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -0,0 +1,104 @@
1
+ /* @preserve
2
+ * @esri/arcgis-rest-auth - v4.0.0-beta.5 - Apache-2.0
3
+ * Copyright (c) 2017-2022 Esri, Inc.
4
+ * Tue Mar 22 2022 19:12:13 GMT+0000 (Coordinated Universal Time)
5
+ */
6
+ (function (global, factory) {
7
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@esri/arcgis-rest-request')) :
8
+ typeof define === 'function' && define.amd ? define(['exports', '@esri/arcgis-rest-request'], factory) :
9
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.arcgisRest = global.arcgisRest || {}, global.arcgisRest));
10
+ })(this, (function (exports, arcgisRestRequest) { 'use strict';
11
+
12
+ Object.defineProperty(exports, 'ApiKey', {
13
+ enumerable: true,
14
+ get: function () { return arcgisRestRequest.ApiKey; }
15
+ });
16
+ Object.defineProperty(exports, 'ApplicationSession', {
17
+ enumerable: true,
18
+ get: function () { return arcgisRestRequest.ApplicationSession; }
19
+ });
20
+ Object.defineProperty(exports, 'AuthenticationProvider', {
21
+ enumerable: true,
22
+ get: function () { return arcgisRestRequest.AuthenticationProvider; }
23
+ });
24
+ Object.defineProperty(exports, 'IApiKeyOptions', {
25
+ enumerable: true,
26
+ get: function () { return arcgisRestRequest.IApiKeyOptions; }
27
+ });
28
+ Object.defineProperty(exports, 'IAppAccess', {
29
+ enumerable: true,
30
+ get: function () { return arcgisRestRequest.IAppAccess; }
31
+ });
32
+ Object.defineProperty(exports, 'IAuthenticatedRequestOptions', {
33
+ enumerable: true,
34
+ get: function () { return arcgisRestRequest.IAuthenticatedRequestOptions; }
35
+ });
36
+ Object.defineProperty(exports, 'ICredential', {
37
+ enumerable: true,
38
+ get: function () { return arcgisRestRequest.ICredential; }
39
+ });
40
+ Object.defineProperty(exports, 'IFetchTokenResponse', {
41
+ enumerable: true,
42
+ get: function () { return arcgisRestRequest.IFetchTokenResponse; }
43
+ });
44
+ Object.defineProperty(exports, 'IOAuth2Options', {
45
+ enumerable: true,
46
+ get: function () { return arcgisRestRequest.IOAuth2Options; }
47
+ });
48
+ Object.defineProperty(exports, 'IPlatformSelfResponse', {
49
+ enumerable: true,
50
+ get: function () { return arcgisRestRequest.IPlatformSelfResponse; }
51
+ });
52
+ Object.defineProperty(exports, 'IUser', {
53
+ enumerable: true,
54
+ get: function () { return arcgisRestRequest.IUser; }
55
+ });
56
+ Object.defineProperty(exports, 'IUserRequestOptions', {
57
+ enumerable: true,
58
+ get: function () { return arcgisRestRequest.IUserRequestOptions; }
59
+ });
60
+ Object.defineProperty(exports, 'UserSession', {
61
+ enumerable: true,
62
+ get: function () { return arcgisRestRequest.UserSession; }
63
+ });
64
+ Object.defineProperty(exports, 'canUseOnlineToken', {
65
+ enumerable: true,
66
+ get: function () { return arcgisRestRequest.canUseOnlineToken; }
67
+ });
68
+ Object.defineProperty(exports, 'exchangeToken', {
69
+ enumerable: true,
70
+ get: function () { return arcgisRestRequest.exchangeToken; }
71
+ });
72
+ Object.defineProperty(exports, 'fetchToken', {
73
+ enumerable: true,
74
+ get: function () { return arcgisRestRequest.fetchToken; }
75
+ });
76
+ Object.defineProperty(exports, 'getOnlineEnvironment', {
77
+ enumerable: true,
78
+ get: function () { return arcgisRestRequest.getOnlineEnvironment; }
79
+ });
80
+ Object.defineProperty(exports, 'isFederated', {
81
+ enumerable: true,
82
+ get: function () { return arcgisRestRequest.isFederated; }
83
+ });
84
+ Object.defineProperty(exports, 'isOnline', {
85
+ enumerable: true,
86
+ get: function () { return arcgisRestRequest.isOnline; }
87
+ });
88
+ Object.defineProperty(exports, 'normalizeOnlinePortalUrl', {
89
+ enumerable: true,
90
+ get: function () { return arcgisRestRequest.normalizeOnlinePortalUrl; }
91
+ });
92
+ Object.defineProperty(exports, 'platformSelf', {
93
+ enumerable: true,
94
+ get: function () { return arcgisRestRequest.platformSelf; }
95
+ });
96
+ Object.defineProperty(exports, 'validateAppAccess', {
97
+ enumerable: true,
98
+ get: function () { return arcgisRestRequest.validateAppAccess; }
99
+ });
100
+
101
+ Object.defineProperty(exports, '__esModule', { value: true });
102
+
103
+ }));
104
+ //# sourceMappingURL=auth.umd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.umd.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,7 @@
1
+ /* @preserve
2
+ * @esri/arcgis-rest-auth - v4.0.0-beta.5 - Apache-2.0
3
+ * Copyright (c) 2017-2022 Esri, Inc.
4
+ * Tue Mar 22 2022 19:12:13 GMT+0000 (Coordinated Universal Time)
5
+ */
6
+ !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@esri/arcgis-rest-request")):"function"==typeof define&&define.amd?define(["exports","@esri/arcgis-rest-request"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).arcgisRest=e.arcgisRest||{},e.arcgisRest)}(this,(function(e,n){"use strict";Object.defineProperty(e,"ApiKey",{enumerable:!0,get:function(){return n.ApiKey}}),Object.defineProperty(e,"ApplicationSession",{enumerable:!0,get:function(){return n.ApplicationSession}}),Object.defineProperty(e,"AuthenticationProvider",{enumerable:!0,get:function(){return n.AuthenticationProvider}}),Object.defineProperty(e,"IApiKeyOptions",{enumerable:!0,get:function(){return n.IApiKeyOptions}}),Object.defineProperty(e,"IAppAccess",{enumerable:!0,get:function(){return n.IAppAccess}}),Object.defineProperty(e,"IAuthenticatedRequestOptions",{enumerable:!0,get:function(){return n.IAuthenticatedRequestOptions}}),Object.defineProperty(e,"ICredential",{enumerable:!0,get:function(){return n.ICredential}}),Object.defineProperty(e,"IFetchTokenResponse",{enumerable:!0,get:function(){return n.IFetchTokenResponse}}),Object.defineProperty(e,"IOAuth2Options",{enumerable:!0,get:function(){return n.IOAuth2Options}}),Object.defineProperty(e,"IPlatformSelfResponse",{enumerable:!0,get:function(){return n.IPlatformSelfResponse}}),Object.defineProperty(e,"IUser",{enumerable:!0,get:function(){return n.IUser}}),Object.defineProperty(e,"IUserRequestOptions",{enumerable:!0,get:function(){return n.IUserRequestOptions}}),Object.defineProperty(e,"UserSession",{enumerable:!0,get:function(){return n.UserSession}}),Object.defineProperty(e,"canUseOnlineToken",{enumerable:!0,get:function(){return n.canUseOnlineToken}}),Object.defineProperty(e,"exchangeToken",{enumerable:!0,get:function(){return n.exchangeToken}}),Object.defineProperty(e,"fetchToken",{enumerable:!0,get:function(){return n.fetchToken}}),Object.defineProperty(e,"getOnlineEnvironment",{enumerable:!0,get:function(){return n.getOnlineEnvironment}}),Object.defineProperty(e,"isFederated",{enumerable:!0,get:function(){return n.isFederated}}),Object.defineProperty(e,"isOnline",{enumerable:!0,get:function(){return n.isOnline}}),Object.defineProperty(e,"normalizeOnlinePortalUrl",{enumerable:!0,get:function(){return n.normalizeOnlinePortalUrl}}),Object.defineProperty(e,"platformSelf",{enumerable:!0,get:function(){return n.platformSelf}}),Object.defineProperty(e,"validateAppAccess",{enumerable:!0,get:function(){return n.validateAppAccess}}),Object.defineProperty(e,"__esModule",{value:!0})}));
7
+ //# sourceMappingURL=auth.umd.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.umd.min.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ /* Copyright (c) 2018 Environmental Systems Research Institute, Inc.
3
+ * Apache-2.0 */
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.validateAppAccess = exports.fetchToken = exports.normalizeOnlinePortalUrl = exports.isOnline = exports.isFederated = exports.getOnlineEnvironment = exports.canUseOnlineToken = exports.platformSelf = exports.exchangeToken = exports.UserSession = exports.ApplicationSession = exports.ApiKey = void 0;
6
+ var arcgis_rest_request_1 = require("@esri/arcgis-rest-request");
7
+ Object.defineProperty(exports, "ApiKey", { enumerable: true, get: function () { return arcgis_rest_request_1.ApiKey; } });
8
+ Object.defineProperty(exports, "ApplicationSession", { enumerable: true, get: function () { return arcgis_rest_request_1.ApplicationSession; } });
9
+ Object.defineProperty(exports, "UserSession", { enumerable: true, get: function () { return arcgis_rest_request_1.UserSession; } });
10
+ Object.defineProperty(exports, "exchangeToken", { enumerable: true, get: function () { return arcgis_rest_request_1.exchangeToken; } });
11
+ Object.defineProperty(exports, "platformSelf", { enumerable: true, get: function () { return arcgis_rest_request_1.platformSelf; } });
12
+ Object.defineProperty(exports, "canUseOnlineToken", { enumerable: true, get: function () { return arcgis_rest_request_1.canUseOnlineToken; } });
13
+ Object.defineProperty(exports, "getOnlineEnvironment", { enumerable: true, get: function () { return arcgis_rest_request_1.getOnlineEnvironment; } });
14
+ Object.defineProperty(exports, "isFederated", { enumerable: true, get: function () { return arcgis_rest_request_1.isFederated; } });
15
+ Object.defineProperty(exports, "isOnline", { enumerable: true, get: function () { return arcgis_rest_request_1.isOnline; } });
16
+ Object.defineProperty(exports, "normalizeOnlinePortalUrl", { enumerable: true, get: function () { return arcgis_rest_request_1.normalizeOnlinePortalUrl; } });
17
+ Object.defineProperty(exports, "fetchToken", { enumerable: true, get: function () { return arcgis_rest_request_1.fetchToken; } });
18
+ Object.defineProperty(exports, "validateAppAccess", { enumerable: true, get: function () { return arcgis_rest_request_1.validateAppAccess; } });
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;gBACgB;;;AAEhB,iEAuBmC;AAtBjC,6GAAA,MAAM,OAAA;AACN,yHAAA,kBAAkB,OAAA;AAClB,kHAAA,WAAW,OAAA;AACX,oHAAA,aAAa,OAAA;AACb,mHAAA,YAAY,OAAA;AACZ,wHAAA,iBAAiB,OAAA;AACjB,2HAAA,oBAAoB,OAAA;AACpB,kHAAA,WAAW,OAAA;AACX,+GAAA,QAAQ,OAAA;AACR,+HAAA,wBAAwB,OAAA;AACxB,iHAAA,UAAU,OAAA;AACV,wHAAA,iBAAiB,OAAA","sourcesContent":["/* Copyright (c) 2018 Environmental Systems Research Institute, Inc.\n * Apache-2.0 */\n\nexport {\n ApiKey,\n ApplicationSession,\n UserSession,\n exchangeToken,\n platformSelf,\n canUseOnlineToken,\n getOnlineEnvironment,\n isFederated,\n isOnline,\n normalizeOnlinePortalUrl,\n fetchToken,\n validateAppAccess,\n AuthenticationProvider,\n IApiKeyOptions,\n ICredential,\n IOAuth2Options,\n IPlatformSelfResponse,\n IAuthenticatedRequestOptions,\n IUserRequestOptions,\n IFetchTokenResponse,\n IAppAccess,\n IUser\n} from \"@esri/arcgis-rest-request\";\n\nimport { IArcGISIdentityManagerOptions } from \"@esri/arcgis-rest-request\";\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface IUserSessionOptions extends IArcGISIdentityManagerOptions {}\n"]}
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "commonjs"
3
+ }
@@ -1,9 +1,4 @@
1
- export * from "./ApplicationSession";
2
- export * from "./ApiKey";
3
- export * from "./UserSession";
4
- export * from "./fetch-token";
5
- export * from "./generate-token";
6
- export * from "./authenticated-request-options";
7
- export { IUser } from "@esri/arcgis-rest-types";
8
- export * from "./app-tokens";
9
- export * from "./validate-app-access";
1
+ export { ApiKey, ApplicationSession, UserSession, exchangeToken, platformSelf, canUseOnlineToken, getOnlineEnvironment, isFederated, isOnline, normalizeOnlinePortalUrl, fetchToken, validateAppAccess, AuthenticationProvider, IApiKeyOptions, ICredential, IOAuth2Options, IPlatformSelfResponse, IAuthenticatedRequestOptions, IUserRequestOptions, IFetchTokenResponse, IAppAccess, IUser } from "@esri/arcgis-rest-request";
2
+ import { IArcGISIdentityManagerOptions } from "@esri/arcgis-rest-request";
3
+ export interface IUserSessionOptions extends IArcGISIdentityManagerOptions {
4
+ }
package/dist/esm/index.js CHANGED
@@ -1,11 +1,4 @@
1
1
  /* Copyright (c) 2018 Environmental Systems Research Institute, Inc.
2
2
  * Apache-2.0 */
3
- export * from "./ApplicationSession";
4
- export * from "./ApiKey";
5
- export * from "./UserSession";
6
- export * from "./fetch-token";
7
- export * from "./generate-token";
8
- export * from "./authenticated-request-options";
9
- export * from "./app-tokens";
10
- export * from "./validate-app-access";
3
+ export { ApiKey, ApplicationSession, UserSession, exchangeToken, platformSelf, canUseOnlineToken, getOnlineEnvironment, isFederated, isOnline, normalizeOnlinePortalUrl, fetchToken, validateAppAccess } from "@esri/arcgis-rest-request";
11
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;gBACgB;AAEhB,cAAc,sBAAsB,CAAC;AACrC,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAEhD,cAAc,cAAc,CAAC;AAE7B,cAAc,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;gBACgB;AAEhB,OAAO,EACL,MAAM,EACN,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,oBAAoB,EACpB,WAAW,EACX,QAAQ,EACR,wBAAwB,EACxB,UAAU,EACV,iBAAiB,EAWlB,MAAM,2BAA2B,CAAC","sourcesContent":["/* Copyright (c) 2018 Environmental Systems Research Institute, Inc.\n * Apache-2.0 */\n\nexport {\n ApiKey,\n ApplicationSession,\n UserSession,\n exchangeToken,\n platformSelf,\n canUseOnlineToken,\n getOnlineEnvironment,\n isFederated,\n isOnline,\n normalizeOnlinePortalUrl,\n fetchToken,\n validateAppAccess,\n AuthenticationProvider,\n IApiKeyOptions,\n ICredential,\n IOAuth2Options,\n IPlatformSelfResponse,\n IAuthenticatedRequestOptions,\n IUserRequestOptions,\n IFetchTokenResponse,\n IAppAccess,\n IUser\n} from \"@esri/arcgis-rest-request\";\n\nimport { IArcGISIdentityManagerOptions } from \"@esri/arcgis-rest-request\";\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface IUserSessionOptions extends IArcGISIdentityManagerOptions {}\n"]}
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "module"
3
+ }
package/package.json CHANGED
@@ -1,65 +1,64 @@
1
1
  {
2
2
  "name": "@esri/arcgis-rest-auth",
3
- "version": "3.4.3",
3
+ "version": "4.0.0-beta.4",
4
4
  "description": "Authentication helpers for @esri/arcgis-rest-js.",
5
- "main": "dist/node/index.js",
6
- "unpkg": "dist/umd/auth.umd.js",
7
- "module": "dist/esm/index.js",
8
- "js:next": "dist/esm/index.js",
9
- "sideEffects": false,
10
- "types": "dist/esm/index.d.ts",
11
5
  "license": "Apache-2.0",
12
- "files": [
13
- "dist/**"
6
+ "keywords": [
7
+ "ES6",
8
+ "arcgis",
9
+ "esri",
10
+ "fetch",
11
+ "promise",
12
+ "typescript"
14
13
  ],
15
- "dependencies": {
16
- "@esri/arcgis-rest-types": "^3.4.3",
17
- "tslib": "^1.13.0"
18
- },
19
- "devDependencies": {
20
- "@esri/arcgis-rest-request": "^3.4.3"
21
- },
22
- "peerDependencies": {
23
- "@esri/arcgis-rest-request": "^3.0.0"
14
+ "type": "module",
15
+ "main": "dist/cjs/index.js",
16
+ "module": "dist/esm/index.js",
17
+ "unpkg": "dist/bundled/auth.umd.min.js",
18
+ "exports": {
19
+ ".": {
20
+ "import": "./dist/esm/index.js",
21
+ "require": "./dist/cjs/index.js"
22
+ },
23
+ "./package.json": "./package.json"
24
24
  },
25
+ "types": "dist/esm/index.d.ts",
26
+ "sideEffects": false,
25
27
  "scripts": {
26
- "prepare": "npm run build",
27
- "prebuild": "rimraf dist",
28
- "build": "npm run build:node && npm run build:umd && npm run build:esm",
29
- "build:esm": "tsc --module es2015 --outDir ./dist/esm --declaration",
30
- "build:umd": "rollup -c ../../umd-base-profile.js && rollup -c ../../umd-production-profile.js",
31
- "build:node": "tsc --module commonjs --outDir ./dist/node",
32
- "dev:esm": "tsc -w --module es2015 --outDir ./dist/esm --declaration",
33
- "dev:umd": "rollup -w -c ../../umd-base-profile.js",
34
- "dev:node": "tsc -w --module commonjs --outDir ./dist/node"
28
+ "build": "npm-run-all --parallel build:*",
29
+ "postbuild": "node ../../scripts/create-dist-package-jsons.js",
30
+ "build:bundled": "rollup -c ../../rollup.js",
31
+ "build:cjs": "tsc --outDir ./dist/cjs -m commonjs",
32
+ "postbuild:cjs": "node ../../scripts/create-dist-package-jsons.js",
33
+ "build:esm": "tsc --outDir ./dist/esm --declaration",
34
+ "postbuild:esm": "node ../../scripts/create-dist-package-jsons.js",
35
+ "dev": "npm-run-all --parallel dev:*",
36
+ "dev:bundled": "rollup -w -c ../../rollup.js",
37
+ "dev:cjs": "tsc -w --outDir ./dist/cjs -m commonjs",
38
+ "dev:esm": "tsc -w --outDir ./dist/esm --declaration"
35
39
  },
36
- "publishConfig": {
37
- "access": "public"
40
+ "engines": {
41
+ "node": ">=12.20.0"
38
42
  },
43
+ "dependencies": {
44
+ "@esri/arcgis-rest-request": "4.0.0-beta.6",
45
+ "tslib": "^2.3.0"
46
+ },
47
+ "contributors": [
48
+ "Patrick Arlt <parlt@esri.com> (http://patrickarlt.com/)"
49
+ ],
50
+ "homepage": "https://github.com/Esri/arcgis-rest-js#readme",
39
51
  "repository": {
40
52
  "type": "git",
41
53
  "url": "git+https://github.com/Esri/arcgis-rest-js.git",
42
54
  "directory": "packages/arcgis-rest-auth"
43
55
  },
44
- "contributors": [
45
- {
46
- "name": "Patrick Arlt",
47
- "email": "parlt@esri.com",
48
- "url": "http://patrickarlt.com/"
49
- }
50
- ],
51
56
  "bugs": {
52
57
  "url": "https://github.com/Esri/arcgis-rest-js/issues"
53
58
  },
54
- "homepage": "https://github.com/Esri/arcgis-rest-js#readme",
55
- "keywords": [
56
- "typescript",
57
- "promise",
58
- "fetch",
59
- "arcgis",
60
- "esri",
61
- "ES6"
62
- ],
59
+ "publishConfig": {
60
+ "access": "public"
61
+ },
63
62
  "esri": {
64
63
  "keyExports": [
65
64
  "UserSession",
package/src/index.ts ADDED
@@ -0,0 +1,32 @@
1
+ /* Copyright (c) 2018 Environmental Systems Research Institute, Inc.
2
+ * Apache-2.0 */
3
+
4
+ export {
5
+ ApiKey,
6
+ ApplicationSession,
7
+ UserSession,
8
+ exchangeToken,
9
+ platformSelf,
10
+ canUseOnlineToken,
11
+ getOnlineEnvironment,
12
+ isFederated,
13
+ isOnline,
14
+ normalizeOnlinePortalUrl,
15
+ fetchToken,
16
+ validateAppAccess,
17
+ AuthenticationProvider,
18
+ IApiKeyOptions,
19
+ ICredential,
20
+ IOAuth2Options,
21
+ IPlatformSelfResponse,
22
+ IAuthenticatedRequestOptions,
23
+ IUserRequestOptions,
24
+ IFetchTokenResponse,
25
+ IAppAccess,
26
+ IUser
27
+ } from "@esri/arcgis-rest-request";
28
+
29
+ import { IArcGISIdentityManagerOptions } from "@esri/arcgis-rest-request";
30
+
31
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface
32
+ export interface IUserSessionOptions extends IArcGISIdentityManagerOptions {}
package/tsconfig.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "extends": "../../tsconfig.json",
3
+ "include": [
4
+ "src/**/*.ts"
5
+ ]
6
+ }
@@ -1,26 +0,0 @@
1
- import { IAuthenticationManager } from "@esri/arcgis-rest-request";
2
- /**
3
- * Options for the `ApiKey` constructor.
4
- */
5
- export interface IApiKeyOptions {
6
- key: string;
7
- }
8
- /**
9
- * ```js
10
- * import { ApiKey } from '@esri/arcgis-rest-auth';
11
- * const apiKey = new ApiKey("...");
12
- * ```
13
- * Used to authenticate with API Keys.
14
- */
15
- export declare class ApiKey implements IAuthenticationManager {
16
- /**
17
- * The current portal the user is authenticated with.
18
- */
19
- readonly portal: string;
20
- private key;
21
- constructor(options: IApiKeyOptions);
22
- /**
23
- * Gets a token (the API Key).
24
- */
25
- getToken(url: string): Promise<string>;
26
- }
@@ -1,23 +0,0 @@
1
- /* Copyright (c) 2017-2019 Environmental Systems Research Institute, Inc.
2
- * Apache-2.0 */
3
- /**
4
- * ```js
5
- * import { ApiKey } from '@esri/arcgis-rest-auth';
6
- * const apiKey = new ApiKey("...");
7
- * ```
8
- * Used to authenticate with API Keys.
9
- */
10
- var ApiKey = /** @class */ (function () {
11
- function ApiKey(options) {
12
- this.key = options.key;
13
- }
14
- /**
15
- * Gets a token (the API Key).
16
- */
17
- ApiKey.prototype.getToken = function (url) {
18
- return Promise.resolve(this.key);
19
- };
20
- return ApiKey;
21
- }());
22
- export { ApiKey };
23
- //# sourceMappingURL=ApiKey.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ApiKey.js","sourceRoot":"","sources":["../../src/ApiKey.ts"],"names":[],"mappings":"AAAA;gBACgB;AAahB;;;;;;GAMG;AACH;IASE,gBAAY,OAAuB;QACjC,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;IACzB,CAAC;IAED;;OAEG;IACI,yBAAQ,GAAf,UAAgB,GAAW;QACzB,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACnC,CAAC;IACH,aAAC;AAAD,CAAC,AAnBD,IAmBC"}