@esri/arcgis-rest-auth 3.4.1 → 4.0.0-beta.2
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.
- package/.ultra.cache.json +1 -0
- package/CHANGELOG.md +95 -0
- package/README.md +5 -5
- package/dist/bundled/auth.esm.js +7 -0
- package/dist/bundled/auth.esm.js.map +1 -0
- package/dist/bundled/auth.esm.min.js +7 -0
- package/dist/bundled/auth.esm.min.js.map +1 -0
- package/dist/bundled/auth.umd.js +112 -0
- package/dist/bundled/auth.umd.js.map +1 -0
- package/dist/bundled/auth.umd.min.js +7 -0
- package/dist/bundled/auth.umd.min.js.map +1 -0
- package/dist/cjs/index.js +20 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/esm/index.d.ts +4 -9
- package/dist/esm/index.js +1 -8
- package/dist/esm/index.js.map +1 -1
- package/package.json +42 -45
- package/src/index.ts +34 -0
- package/tsconfig.json +6 -0
- package/dist/esm/ApiKey.d.ts +0 -26
- package/dist/esm/ApiKey.js +0 -23
- package/dist/esm/ApiKey.js.map +0 -1
- package/dist/esm/ApplicationSession.d.ts +0 -60
- package/dist/esm/ApplicationSession.js +0 -59
- package/dist/esm/ApplicationSession.js.map +0 -1
- package/dist/esm/UserSession.d.ts +0 -496
- package/dist/esm/UserSession.js +0 -890
- package/dist/esm/UserSession.js.map +0 -1
- package/dist/esm/app-tokens.d.ts +0 -87
- package/dist/esm/app-tokens.js +0 -104
- package/dist/esm/app-tokens.js.map +0 -1
- package/dist/esm/authenticated-request-options.d.ts +0 -18
- package/dist/esm/authenticated-request-options.js +0 -3
- package/dist/esm/authenticated-request-options.js.map +0 -1
- package/dist/esm/federation-utils.d.ts +0 -5
- package/dist/esm/federation-utils.js +0 -59
- package/dist/esm/federation-utils.js.map +0 -1
- package/dist/esm/fetch-token.d.ts +0 -9
- package/dist/esm/fetch-token.js +0 -23
- package/dist/esm/fetch-token.js.map +0 -1
- package/dist/esm/generate-token.d.ts +0 -7
- package/dist/esm/generate-token.js +0 -17
- package/dist/esm/generate-token.js.map +0 -1
- package/dist/esm/validate-app-access.d.ts +0 -47
- package/dist/esm/validate-app-access.js +0 -52
- package/dist/esm/validate-app-access.js.map +0 -1
- package/dist/node/ApiKey.js +0 -26
- package/dist/node/ApiKey.js.map +0 -1
- package/dist/node/ApplicationSession.js +0 -62
- package/dist/node/ApplicationSession.js.map +0 -1
- package/dist/node/UserSession.js +0 -893
- package/dist/node/UserSession.js.map +0 -1
- package/dist/node/app-tokens.js +0 -109
- package/dist/node/app-tokens.js.map +0 -1
- package/dist/node/authenticated-request-options.js +0 -5
- package/dist/node/authenticated-request-options.js.map +0 -1
- package/dist/node/federation-utils.js +0 -67
- package/dist/node/federation-utils.js.map +0 -1
- package/dist/node/fetch-token.js +0 -27
- package/dist/node/fetch-token.js.map +0 -1
- package/dist/node/generate-token.js +0 -21
- package/dist/node/generate-token.js.map +0 -1
- package/dist/node/index.js +0 -14
- package/dist/node/index.js.map +0 -1
- package/dist/node/validate-app-access.js +0 -56
- package/dist/node/validate-app-access.js.map +0 -1
- package/dist/umd/auth.umd.js +0 -1253
- package/dist/umd/auth.umd.js.map +0 -1
- package/dist/umd/auth.umd.min.js +0 -7
- package/dist/umd/auth.umd.min.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"files":{"dist":"1646250951881.6191","CHANGELOG.md":"8cfe28104a3d284487a6a28940d6b59dcbb9f33c","README.md":"9a12530bdf570733e0133530d2c2bb2eb99c316b","package.json":"4ccabaf0addaa34063ad92b45c32f9783eb84595","src/index.ts":"9dbc8d9be699dd917fc7cf33f156810d86dc6e43","tsconfig.json":"90cbf37afa22bf149841064433be84fbb7e8f5e8"},"deps":{"@esri/arcgis-rest-request":1646250950989.6155}}
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# @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)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **arcgis-rest-request:** rewrite oauth 2 functions to use PKCE ([e49f88c](https://github.com/Esri/arcgis-rest-js/commit/e49f88c700694aed472733527124c4d0d54e45d6))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Dependencies
|
|
13
|
+
|
|
14
|
+
* **@esri/arcgis-rest-request:** upgraded to 4.0.0-beta.2
|
|
15
|
+
|
|
16
|
+
# @esri/arcgis-rest-auth 1.0.0-beta.1 (2022-02-17)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* switch to eslint, fix minor issues, disable other rules ([ab47412](https://github.com/Esri/arcgis-rest-js/commit/ab474123d3a056dcd52a8898f39f287893626f35))
|
|
22
|
+
* **arcgis-rest-auth:** export validateAppAccess ([6d1e2ef](https://github.com/Esri/arcgis-rest-js/commit/6d1e2ef012ca25464e6219b5d909a30e5f1cecee))
|
|
23
|
+
* **arcgis-rest-auth:** postMessage internals ([bd8eb6c](https://github.com/Esri/arcgis-rest-js/commit/bd8eb6c0363483209645c5cc7cf19ad1a8114cc6))
|
|
24
|
+
* **UserSession:** remove /sharing/rest from server url during postMessage auth ([04fcdbd](https://github.com/Esri/arcgis-rest-js/commit/04fcdbd5307c79e55610a1bb7e049e3e18f0f0cc))
|
|
25
|
+
* **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)
|
|
26
|
+
* ensure platformSelf sends cookie ([29e33cb](https://github.com/Esri/arcgis-rest-js/commit/29e33cb9b9d0a2e25e412106adb06ff054bd5737))
|
|
27
|
+
* export app-tokens ([0171204](https://github.com/Esri/arcgis-rest-js/commit/017120498b32c9322689ad539b216ce8e5c96a3a))
|
|
28
|
+
* export validateAppAccess function ([b087de2](https://github.com/Esri/arcgis-rest-js/commit/b087de24ae6d8f41a2bb13c3c25a33943f0db2d8))
|
|
29
|
+
* platformSelf to send cookies and append f=json in url ([ed81919](https://github.com/Esri/arcgis-rest-js/commit/ed819194da74075172ff26139f2db4491d79ed12))
|
|
30
|
+
* update IPlatformSelfResponse to include expires_in ([dd3557b](https://github.com/Esri/arcgis-rest-js/commit/dd3557b19514a33150db2f15138422bb219681e7))
|
|
31
|
+
* **:bug::** ensure fix session.portal url when cred.server contains sharing/rest ([815de49](https://github.com/Esri/arcgis-rest-js/commit/815de49549b35aa9d255de6b05c2beb2d153f37f))
|
|
32
|
+
* **: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))
|
|
33
|
+
* **: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)
|
|
34
|
+
* **: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)
|
|
35
|
+
* **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)
|
|
36
|
+
* **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))
|
|
37
|
+
* **auth:** add additional authentication providers ([85f73b2](https://github.com/Esri/arcgis-rest-js/commit/85f73b22c17a3a3ae72b559a63df2aef8297828c))
|
|
38
|
+
* **auth:** allow trailing slash in portal URL ([b76da90](https://github.com/Esri/arcgis-rest-js/commit/b76da902d67d4ac3635ac18eb780e7c68d7617f7))
|
|
39
|
+
* **auth:** better regex match for usernames ([d38a7fb](https://github.com/Esri/arcgis-rest-js/commit/d38a7fb0e1bff3c49a135bc10be74893ec60a1e9))
|
|
40
|
+
* **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)
|
|
41
|
+
* **auth:** improve query and error handling when completing sign in ([4b3905c](https://github.com/Esri/arcgis-rest-js/commit/4b3905ca6517443c9237a44c0fc3249e579db8f5))
|
|
42
|
+
* **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)
|
|
43
|
+
* **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)
|
|
44
|
+
* **lock:** pass through url and options for non-federated requests ([802006c](https://github.com/Esri/arcgis-rest-js/commit/802006cdc68e69851e80c499a236ba4c8fa1cb6f))
|
|
45
|
+
* **oauth:** check for window parent correctly in ouath without popup ([a27bb7d](https://github.com/Esri/arcgis-rest-js/commit/a27bb7da5fa5de7ddfbc2d676b707bfa1780ecbf))
|
|
46
|
+
* **oAuth:** fix oAuth2 methods in IE 11 and Edge ([462f980](https://github.com/Esri/arcgis-rest-js/commit/462f980082f9eeb8c55b5aa6c5981422ae40105f))
|
|
47
|
+
* **OAuth2 options:** added locale and state parameters for browser based OAuth2 ([b05996e](https://github.com/Esri/arcgis-rest-js/commit/b05996e83b1836f9a27337939a9a681d41207504))
|
|
48
|
+
* **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)
|
|
49
|
+
* **release:** resolve issues from accidental 1.0.1 release. ([ddd3d6c](https://github.com/Esri/arcgis-rest-js/commit/ddd3d6cab0fb0d789da866cea07244b7a170d9fd))
|
|
50
|
+
* **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))
|
|
51
|
+
* **release-automation:** fix issues uncovered by 1st release ([a73b76f](https://github.com/Esri/arcgis-rest-js/commit/a73b76f58843d538d8b29b1ae60a72a9f57ac5ec))
|
|
52
|
+
* **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)
|
|
53
|
+
* **sharing:** rework group membership checking, fix UserSession.getUser scope issue ([909a37e](https://github.com/Esri/arcgis-rest-js/commit/909a37ec2f928ad223c674ae0d4033e24761ae9a))
|
|
54
|
+
* **try:** try an anonymous request before throwing an auth error ([9209035](https://github.com/Esri/arcgis-rest-js/commit/9209035072b54bf68425ee9737e2a15010ac1b33))
|
|
55
|
+
* **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)
|
|
56
|
+
* **UserSession:** will now update expired tokens on non-federated servers ([af121c1](https://github.com/Esri/arcgis-rest-js/commit/af121c1de1c96027a2ca107ed46a7877b61c5a4f))
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
### Code Refactoring
|
|
60
|
+
|
|
61
|
+
* change casing of IOauth2Options to IOAuth2Options ([9ffd227](https://github.com/Esri/arcgis-rest-js/commit/9ffd2277055864d5257cb7a6c9913c70079e7da5))
|
|
62
|
+
* deprecate common-types package (in favor of common) ([6ab2e75](https://github.com/Esri/arcgis-rest-js/commit/6ab2e75a3b57ce77391da7f2a16ab57a3e781000))
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
### Features
|
|
66
|
+
|
|
67
|
+
* **: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)
|
|
68
|
+
* **: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)
|
|
69
|
+
* **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)
|
|
70
|
+
* **ApplicationSession:** only allow 1 pending request for a new token at a time ([4e6f9e2](https://github.com/Esri/arcgis-rest-js/commit/4e6f9e27d561566449ef2338b078f44d0e3b65b5))
|
|
71
|
+
* **arcgis-rest-auth:** add postMessage auth support ([a6b8a17](https://github.com/Esri/arcgis-rest-js/commit/a6b8a17a265339725a8c5dfd90e408f28a035787))
|
|
72
|
+
* **arcgis-rest-auth:** add validateAppAccess function and UserSession method ([2478ea5](https://github.com/Esri/arcgis-rest-js/commit/2478ea56d43302d3f7fab6ffd38a9d2c609bb510))
|
|
73
|
+
* **arcgis-rest-auth:** reduce postMessageAuth query params ([154515f](https://github.com/Esri/arcgis-rest-js/commit/154515f66a4eedb9ee83dd8528549db55e268871))
|
|
74
|
+
* **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)
|
|
75
|
+
* **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)
|
|
76
|
+
* **caring:** methods to un/share items with groups ([8572bb0](https://github.com/Esri/arcgis-rest-js/commit/8572bb0ab0222e4f0eedbe9cfd4ff00c160f0c77))
|
|
77
|
+
* **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)
|
|
78
|
+
* **UserSession:** added optional 'popupWindowFeatures' to 'IOAuth2Options' ([f96a581](https://github.com/Esri/arcgis-rest-js/commit/f96a581033513c9a546998bc37254a46e364f153))
|
|
79
|
+
* **UserSession:** multiple requests to getToken for similar URLs now return the same Promise ([751e5f1](https://github.com/Esri/arcgis-rest-js/commit/751e5f19d2e6fac184a0a17cc216c54cc5c1e9f2))
|
|
80
|
+
* **UserSession:** rename refreshTokenDuration to refreshTokenTTL ([a6406d4](https://github.com/Esri/arcgis-rest-js/commit/a6406d4d10308b266fd7ddcc6168f32419f206aa))
|
|
81
|
+
* **util:** add getUserUrl method to auth package ([d742b34](https://github.com/Esri/arcgis-rest-js/commit/d742b343130a8a0d5baaf9391ac48f5c5c334c6d))
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
### BREAKING CHANGES
|
|
85
|
+
|
|
86
|
+
* deprecate common-types package (in favor of common)
|
|
87
|
+
* change casing of IOauth2Options to IOAuth2Options
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
### Dependencies
|
|
94
|
+
|
|
95
|
+
* **@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/
|
|
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
|
|
27
|
+
import { UserSession } from "@esri/arcgis-rest-auth";
|
|
28
28
|
|
|
29
29
|
const session = new UserSession({
|
|
30
|
-
|
|
31
|
-
|
|
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.
|
|
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 - v3.3.0 - Apache-2.0
|
|
3
|
+
* Copyright (c) 2017-2022 Esri, Inc.
|
|
4
|
+
* Wed Mar 02 2022 19:55:51 GMT+0000 (Coordinated Universal Time)
|
|
5
|
+
*/
|
|
6
|
+
export { ApiKey, ApplicationSession, AuthenticationProvider, IApiKeyOptions, IAppAccess, IAuthenticatedRequestOptions, ICredential, IFetchTokenResponse, IGenerateTokenResponse, IOAuth2Options, IPlatformSelfResponse, IUser, IUserRequestOptions, UserSession, canUseOnlineToken, exchangeToken, fetchToken, generateToken, 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 - v3.3.0 - Apache-2.0
|
|
3
|
+
* Copyright (c) 2017-2022 Esri, Inc.
|
|
4
|
+
* Wed Mar 02 2022 19:55:51 GMT+0000 (Coordinated Universal Time)
|
|
5
|
+
*/
|
|
6
|
+
export{ApiKey,ApplicationSession,AuthenticationProvider,IApiKeyOptions,IAppAccess,IAuthenticatedRequestOptions,ICredential,IFetchTokenResponse,IGenerateTokenResponse,IOAuth2Options,IPlatformSelfResponse,IUser,IUserRequestOptions,UserSession,canUseOnlineToken,exchangeToken,fetchToken,generateToken,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,112 @@
|
|
|
1
|
+
/* @preserve
|
|
2
|
+
* @esri/arcgis-rest-auth - v3.3.0 - Apache-2.0
|
|
3
|
+
* Copyright (c) 2017-2022 Esri, Inc.
|
|
4
|
+
* Wed Mar 02 2022 19:55:51 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, 'IGenerateTokenResponse', {
|
|
45
|
+
enumerable: true,
|
|
46
|
+
get: function () { return arcgisRestRequest.IGenerateTokenResponse; }
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, 'IOAuth2Options', {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function () { return arcgisRestRequest.IOAuth2Options; }
|
|
51
|
+
});
|
|
52
|
+
Object.defineProperty(exports, 'IPlatformSelfResponse', {
|
|
53
|
+
enumerable: true,
|
|
54
|
+
get: function () { return arcgisRestRequest.IPlatformSelfResponse; }
|
|
55
|
+
});
|
|
56
|
+
Object.defineProperty(exports, 'IUser', {
|
|
57
|
+
enumerable: true,
|
|
58
|
+
get: function () { return arcgisRestRequest.IUser; }
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(exports, 'IUserRequestOptions', {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function () { return arcgisRestRequest.IUserRequestOptions; }
|
|
63
|
+
});
|
|
64
|
+
Object.defineProperty(exports, 'UserSession', {
|
|
65
|
+
enumerable: true,
|
|
66
|
+
get: function () { return arcgisRestRequest.UserSession; }
|
|
67
|
+
});
|
|
68
|
+
Object.defineProperty(exports, 'canUseOnlineToken', {
|
|
69
|
+
enumerable: true,
|
|
70
|
+
get: function () { return arcgisRestRequest.canUseOnlineToken; }
|
|
71
|
+
});
|
|
72
|
+
Object.defineProperty(exports, 'exchangeToken', {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: function () { return arcgisRestRequest.exchangeToken; }
|
|
75
|
+
});
|
|
76
|
+
Object.defineProperty(exports, 'fetchToken', {
|
|
77
|
+
enumerable: true,
|
|
78
|
+
get: function () { return arcgisRestRequest.fetchToken; }
|
|
79
|
+
});
|
|
80
|
+
Object.defineProperty(exports, 'generateToken', {
|
|
81
|
+
enumerable: true,
|
|
82
|
+
get: function () { return arcgisRestRequest.generateToken; }
|
|
83
|
+
});
|
|
84
|
+
Object.defineProperty(exports, 'getOnlineEnvironment', {
|
|
85
|
+
enumerable: true,
|
|
86
|
+
get: function () { return arcgisRestRequest.getOnlineEnvironment; }
|
|
87
|
+
});
|
|
88
|
+
Object.defineProperty(exports, 'isFederated', {
|
|
89
|
+
enumerable: true,
|
|
90
|
+
get: function () { return arcgisRestRequest.isFederated; }
|
|
91
|
+
});
|
|
92
|
+
Object.defineProperty(exports, 'isOnline', {
|
|
93
|
+
enumerable: true,
|
|
94
|
+
get: function () { return arcgisRestRequest.isOnline; }
|
|
95
|
+
});
|
|
96
|
+
Object.defineProperty(exports, 'normalizeOnlinePortalUrl', {
|
|
97
|
+
enumerable: true,
|
|
98
|
+
get: function () { return arcgisRestRequest.normalizeOnlinePortalUrl; }
|
|
99
|
+
});
|
|
100
|
+
Object.defineProperty(exports, 'platformSelf', {
|
|
101
|
+
enumerable: true,
|
|
102
|
+
get: function () { return arcgisRestRequest.platformSelf; }
|
|
103
|
+
});
|
|
104
|
+
Object.defineProperty(exports, 'validateAppAccess', {
|
|
105
|
+
enumerable: true,
|
|
106
|
+
get: function () { return arcgisRestRequest.validateAppAccess; }
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
110
|
+
|
|
111
|
+
}));
|
|
112
|
+
//# 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 - v3.3.0 - Apache-2.0
|
|
3
|
+
* Copyright (c) 2017-2022 Esri, Inc.
|
|
4
|
+
* Wed Mar 02 2022 19:55:51 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,"IGenerateTokenResponse",{enumerable:!0,get:function(){return n.IGenerateTokenResponse}}),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,"generateToken",{enumerable:!0,get:function(){return n.generateToken}}),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,20 @@
|
|
|
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.generateToken = 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, "generateToken", { enumerable: true, get: function () { return arcgis_rest_request_1.generateToken; } });
|
|
19
|
+
Object.defineProperty(exports, "validateAppAccess", { enumerable: true, get: function () { return arcgis_rest_request_1.validateAppAccess; } });
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;gBACgB;;;AAEhB,iEAyBmC;AAxBjC,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,oHAAA,aAAa,OAAA;AACb,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 generateToken,\n validateAppAccess,\n AuthenticationProvider,\n IApiKeyOptions,\n ICredential,\n IOAuth2Options,\n IPlatformSelfResponse,\n IAuthenticatedRequestOptions,\n IUserRequestOptions,\n IFetchTokenResponse,\n IGenerateTokenResponse,\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"]}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
|
|
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, generateToken, validateAppAccess, AuthenticationProvider, IApiKeyOptions, ICredential, IOAuth2Options, IPlatformSelfResponse, IAuthenticatedRequestOptions, IUserRequestOptions, IFetchTokenResponse, IGenerateTokenResponse, 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
|
|
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, generateToken, validateAppAccess } from "@esri/arcgis-rest-request";
|
|
11
4
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;gBACgB;AAEhB,
|
|
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,aAAa,EACb,iBAAiB,EAYlB,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 generateToken,\n validateAppAccess,\n AuthenticationProvider,\n IApiKeyOptions,\n ICredential,\n IOAuth2Options,\n IPlatformSelfResponse,\n IAuthenticatedRequestOptions,\n IUserRequestOptions,\n IFetchTokenResponse,\n IGenerateTokenResponse,\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"]}
|
package/package.json
CHANGED
|
@@ -1,65 +1,62 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@esri/arcgis-rest-auth",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0-beta.2",
|
|
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
|
-
"
|
|
13
|
-
"
|
|
6
|
+
"keywords": [
|
|
7
|
+
"ES6",
|
|
8
|
+
"arcgis",
|
|
9
|
+
"esri",
|
|
10
|
+
"fetch",
|
|
11
|
+
"promise",
|
|
12
|
+
"typescript"
|
|
14
13
|
],
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"build": "
|
|
29
|
-
"build:
|
|
30
|
-
"build:
|
|
31
|
-
"
|
|
32
|
-
"dev:
|
|
33
|
-
"dev:
|
|
34
|
-
"dev:
|
|
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
|
+
"build:esm": "tsc --outDir ./dist/esm --declaration",
|
|
33
|
+
"dev": "npm-run-all --parallel dev:*",
|
|
34
|
+
"dev:bundled": "rollup -w -c ../../rollup.js",
|
|
35
|
+
"dev:cjs": "tsc -w --outDir ./dist/cjs -m commonjs",
|
|
36
|
+
"dev:esm": "tsc -w --outDir ./dist/esm --declaration"
|
|
35
37
|
},
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
+
"engines": {
|
|
39
|
+
"node": ">=12.20.0"
|
|
38
40
|
},
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"@esri/arcgis-rest-request": "4.0.0-beta.2",
|
|
43
|
+
"tslib": "^2.3.0"
|
|
44
|
+
},
|
|
45
|
+
"contributors": [
|
|
46
|
+
"Patrick Arlt <parlt@esri.com> (http://patrickarlt.com/)"
|
|
47
|
+
],
|
|
48
|
+
"homepage": "https://github.com/Esri/arcgis-rest-js#readme",
|
|
39
49
|
"repository": {
|
|
40
50
|
"type": "git",
|
|
41
51
|
"url": "git+https://github.com/Esri/arcgis-rest-js.git",
|
|
42
52
|
"directory": "packages/arcgis-rest-auth"
|
|
43
53
|
},
|
|
44
|
-
"contributors": [
|
|
45
|
-
{
|
|
46
|
-
"name": "Patrick Arlt",
|
|
47
|
-
"email": "parlt@esri.com",
|
|
48
|
-
"url": "http://patrickarlt.com/"
|
|
49
|
-
}
|
|
50
|
-
],
|
|
51
54
|
"bugs": {
|
|
52
55
|
"url": "https://github.com/Esri/arcgis-rest-js/issues"
|
|
53
56
|
},
|
|
54
|
-
"
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"promise",
|
|
58
|
-
"fetch",
|
|
59
|
-
"arcgis",
|
|
60
|
-
"esri",
|
|
61
|
-
"ES6"
|
|
62
|
-
],
|
|
57
|
+
"publishConfig": {
|
|
58
|
+
"access": "public"
|
|
59
|
+
},
|
|
63
60
|
"esri": {
|
|
64
61
|
"keyExports": [
|
|
65
62
|
"UserSession",
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
generateToken,
|
|
17
|
+
validateAppAccess,
|
|
18
|
+
AuthenticationProvider,
|
|
19
|
+
IApiKeyOptions,
|
|
20
|
+
ICredential,
|
|
21
|
+
IOAuth2Options,
|
|
22
|
+
IPlatformSelfResponse,
|
|
23
|
+
IAuthenticatedRequestOptions,
|
|
24
|
+
IUserRequestOptions,
|
|
25
|
+
IFetchTokenResponse,
|
|
26
|
+
IGenerateTokenResponse,
|
|
27
|
+
IAppAccess,
|
|
28
|
+
IUser
|
|
29
|
+
} from "@esri/arcgis-rest-request";
|
|
30
|
+
|
|
31
|
+
import { IArcGISIdentityManagerOptions } from "@esri/arcgis-rest-request";
|
|
32
|
+
|
|
33
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
34
|
+
export interface IUserSessionOptions extends IArcGISIdentityManagerOptions {}
|
package/tsconfig.json
ADDED
package/dist/esm/ApiKey.d.ts
DELETED
|
@@ -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
|
-
}
|
package/dist/esm/ApiKey.js
DELETED
|
@@ -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
|
package/dist/esm/ApiKey.js.map
DELETED
|
@@ -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"}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { IAuthenticationManager, ITokenRequestOptions } from "@esri/arcgis-rest-request";
|
|
2
|
-
export interface IApplicationSessionOptions {
|
|
3
|
-
/**
|
|
4
|
-
* Client ID of your application. Can be obtained by registering an application
|
|
5
|
-
* on [ArcGIS for Developers](https://developers.arcgis.com/documentation/core-concepts/security-and-authentication/signing-in-arcgis-online-users/#registering-your-application),
|
|
6
|
-
* [ArcGIS Online](http://doc.arcgis.com/en/arcgis-online/share-maps/add-items.htm#ESRI_SECTION1_0D1B620254F745AE84F394289F8AF44B) or on your instance of ArcGIS Enterprise.
|
|
7
|
-
*/
|
|
8
|
-
clientId: string;
|
|
9
|
-
/**
|
|
10
|
-
* A Client Secret is also obtained by registering an application
|
|
11
|
-
* on [ArcGIS for Developers](https://developers.arcgis.com/documentation/core-concepts/security-and-authentication/signing-in-arcgis-online-users/#registering-your-application),
|
|
12
|
-
* [ArcGIS Online](http://doc.arcgis.com/en/arcgis-online/share-maps/add-items.htm#ESRI_SECTION1_0D1B620254F745AE84F394289F8AF44B) or on your instance of ArcGIS Enterprise. Treat it like a password.
|
|
13
|
-
*/
|
|
14
|
-
clientSecret: string;
|
|
15
|
-
/**
|
|
16
|
-
* OAuth 2.0 access token from a previous application session.
|
|
17
|
-
*/
|
|
18
|
-
token?: string;
|
|
19
|
-
/**
|
|
20
|
-
* Expiration date for the `token`
|
|
21
|
-
*/
|
|
22
|
-
expires?: Date;
|
|
23
|
-
/**
|
|
24
|
-
* URL of ArcGIS REST base, defaults to "https://www.arcgis.com/sharing/rest"
|
|
25
|
-
*/
|
|
26
|
-
portal?: string;
|
|
27
|
-
/**
|
|
28
|
-
* Duration of requested tokens in minutes. defaults to 7200 (5 days).
|
|
29
|
-
*/
|
|
30
|
-
duration?: number;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* ```js
|
|
34
|
-
* import { ApplicationSession } from '@esri/arcgis-rest-auth';
|
|
35
|
-
* const session = new ApplicationSession({
|
|
36
|
-
* clientId: "abc123",
|
|
37
|
-
* clientSecret: "sshhhhhh"
|
|
38
|
-
* })
|
|
39
|
-
* // visit https://developers.arcgis.com to generate your own clientid and secret
|
|
40
|
-
* ```
|
|
41
|
-
* You can use [App Login](/arcgis-rest-js/guides/node/) to access premium content and services in ArcGIS Online.
|
|
42
|
-
*
|
|
43
|
-
*/
|
|
44
|
-
export declare class ApplicationSession implements IAuthenticationManager {
|
|
45
|
-
portal: string;
|
|
46
|
-
private clientId;
|
|
47
|
-
private clientSecret;
|
|
48
|
-
private token;
|
|
49
|
-
private expires;
|
|
50
|
-
private duration;
|
|
51
|
-
/**
|
|
52
|
-
* Internal object to keep track of pending token requests. Used to prevent
|
|
53
|
-
* duplicate token requests.
|
|
54
|
-
*/
|
|
55
|
-
private _pendingTokenRequest;
|
|
56
|
-
constructor(options: IApplicationSessionOptions);
|
|
57
|
-
getToken(url: string, requestOptions?: ITokenRequestOptions): Promise<string>;
|
|
58
|
-
refreshToken(requestOptions?: ITokenRequestOptions): Promise<string>;
|
|
59
|
-
refreshSession(): Promise<this>;
|
|
60
|
-
}
|