@esri/arcgis-rest-auth 4.0.0-beta.3 → 4.0.1

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/README.md CHANGED
@@ -1,60 +1,10 @@
1
- [![npm version][npm-img]][npm-url]
2
- [![build status][travis-img]][travis-url]
3
- [![gzip bundle size][gzip-image]][npm-url]
4
- [![Coverage Status][coverage-img]][coverage-url]
5
- [![apache licensed](https://img.shields.io/badge/license-Apache-green.svg?style=flat-square)](https://raw.githubusercontent.com/Esri/arcgis-rest-js/master/LICENSE)
6
-
7
- [npm-img]: https://img.shields.io/npm/v/@esri/arcgis-rest-auth.svg?style=flat-square
8
- [npm-url]: https://www.npmjs.com/package/@esri/arcgis-rest-auth
9
- [travis-img]: https://img.shields.io/travis/Esri/arcgis-rest-js/master.svg?style=flat-square
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/bundled/auth.umd.min.js?compression=gzip
12
- [coverage-img]: https://codecov.io/gh/Esri/arcgis-rest-js/branch/master/graph/badge.svg
13
- [coverage-url]: https://codecov.io/gh/Esri/arcgis-rest-js
14
-
15
1
  # @esri/arcgis-rest-auth
16
2
 
17
- > Authentication helpers for [`@esri/arcgis-rest-*`](https://github.com/Esri/arcgis-rest-js).
18
-
19
- ### Example
20
-
21
- ```bash
22
- npm install @esri/arcgis-rest-request
23
- npm install @esri/arcgis-rest-auth
24
- ```
25
-
26
- ```js
27
- import { UserSession } from "@esri/arcgis-rest-auth";
28
-
29
- const session = new UserSession({
30
- username: "casey",
31
- password: "123456"
32
- });
33
- ```
34
-
35
- ### [API Reference](https://esri.github.io/arcgis-rest-js/api/auth/)
36
-
37
- ### Issues
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.
40
-
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
-
43
- ### Versioning
44
-
45
- For transparency into the release cycle and in striving to maintain backward compatibility, @esri/arcgis-rest-js is maintained under Semantic Versioning guidelines and will adhere to these rules whenever possible.
46
-
47
- For more information on SemVer, please visit <http://semver.org/>.
48
-
49
- ### Contributing
50
-
51
- Esri welcomes contributions from anyone and everyone. Please see our [guidelines for contributing](CONTRIBUTING.md).
52
-
53
- ### [Changelog](https://github.com/Esri/arcgis-rest-js/blob/master/CHANGELOG.md)
3
+ `@esri/arcgis-rest-auth` is deprecated at v4.0.0 of ArcGIS REST JS. Authentication helpers are now part of `@esri/arcgis-rest-request`.
54
4
 
55
5
  ### License
56
6
 
57
- Copyright &copy; 2017-2019 Esri
7
+ Copyright &copy; 2017-2022 Esri
58
8
 
59
9
  Licensed under the Apache License, Version 2.0 (the "License");
60
10
  you may not use this file except in compliance with the License.
@@ -1,7 +1,7 @@
1
1
  /* @preserve
2
- * @esri/arcgis-rest-auth - v4.0.0-beta.2 - Apache-2.0
2
+ * @esri/arcgis-rest-auth - v4.0.0 - Apache-2.0
3
3
  * Copyright (c) 2017-2022 Esri, Inc.
4
- * Thu Mar 10 2022 23:21:02 GMT+0000 (Coordinated Universal Time)
4
+ * Wed Apr 20 2022 22:27:37 GMT+0000 (Coordinated Universal Time)
5
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';
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
7
  //# sourceMappingURL=auth.esm.js.map
@@ -1,7 +1,7 @@
1
1
  /* @preserve
2
- * @esri/arcgis-rest-auth - v4.0.0-beta.2 - Apache-2.0
2
+ * @esri/arcgis-rest-auth - v4.0.0 - Apache-2.0
3
3
  * Copyright (c) 2017-2022 Esri, Inc.
4
- * Thu Mar 10 2022 23:21:02 GMT+0000 (Coordinated Universal Time)
4
+ * Wed Apr 20 2022 22:27:37 GMT+0000 (Coordinated Universal Time)
5
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";
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
7
  //# sourceMappingURL=auth.esm.min.js.map
@@ -1,7 +1,7 @@
1
1
  /* @preserve
2
- * @esri/arcgis-rest-auth - v4.0.0-beta.2 - Apache-2.0
2
+ * @esri/arcgis-rest-auth - v4.0.0 - Apache-2.0
3
3
  * Copyright (c) 2017-2022 Esri, Inc.
4
- * Thu Mar 10 2022 23:21:02 GMT+0000 (Coordinated Universal Time)
4
+ * Wed Apr 20 2022 22:27:37 GMT+0000 (Coordinated Universal Time)
5
5
  */
6
6
  (function (global, factory) {
7
7
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@esri/arcgis-rest-request')) :
@@ -41,10 +41,6 @@
41
41
  enumerable: true,
42
42
  get: function () { return arcgisRestRequest.IFetchTokenResponse; }
43
43
  });
44
- Object.defineProperty(exports, 'IGenerateTokenResponse', {
45
- enumerable: true,
46
- get: function () { return arcgisRestRequest.IGenerateTokenResponse; }
47
- });
48
44
  Object.defineProperty(exports, 'IOAuth2Options', {
49
45
  enumerable: true,
50
46
  get: function () { return arcgisRestRequest.IOAuth2Options; }
@@ -77,10 +73,6 @@
77
73
  enumerable: true,
78
74
  get: function () { return arcgisRestRequest.fetchToken; }
79
75
  });
80
- Object.defineProperty(exports, 'generateToken', {
81
- enumerable: true,
82
- get: function () { return arcgisRestRequest.generateToken; }
83
- });
84
76
  Object.defineProperty(exports, 'getOnlineEnvironment', {
85
77
  enumerable: true,
86
78
  get: function () { return arcgisRestRequest.getOnlineEnvironment; }
@@ -1 +1 @@
1
- {"version":3,"file":"auth.umd.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"auth.umd.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,7 +1,7 @@
1
1
  /* @preserve
2
- * @esri/arcgis-rest-auth - v4.0.0-beta.2 - Apache-2.0
2
+ * @esri/arcgis-rest-auth - v4.0.0 - Apache-2.0
3
3
  * Copyright (c) 2017-2022 Esri, Inc.
4
- * Thu Mar 10 2022 23:21:02 GMT+0000 (Coordinated Universal Time)
4
+ * Wed Apr 20 2022 22:27:37 GMT+0000 (Coordinated Universal Time)
5
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})}));
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
7
  //# sourceMappingURL=auth.umd.min.js.map
package/dist/cjs/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  /* Copyright (c) 2018 Environmental Systems Research Institute, Inc.
3
3
  * Apache-2.0 */
4
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;
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
6
  var arcgis_rest_request_1 = require("@esri/arcgis-rest-request");
7
7
  Object.defineProperty(exports, "ApiKey", { enumerable: true, get: function () { return arcgis_rest_request_1.ApiKey; } });
8
8
  Object.defineProperty(exports, "ApplicationSession", { enumerable: true, get: function () { return arcgis_rest_request_1.ApplicationSession; } });
@@ -15,6 +15,5 @@ Object.defineProperty(exports, "isFederated", { enumerable: true, get: function
15
15
  Object.defineProperty(exports, "isOnline", { enumerable: true, get: function () { return arcgis_rest_request_1.isOnline; } });
16
16
  Object.defineProperty(exports, "normalizeOnlinePortalUrl", { enumerable: true, get: function () { return arcgis_rest_request_1.normalizeOnlinePortalUrl; } });
17
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
18
  Object.defineProperty(exports, "validateAppAccess", { enumerable: true, get: function () { return arcgis_rest_request_1.validateAppAccess; } });
20
19
  //# sourceMappingURL=index.js.map
@@ -1 +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"]}
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"]}
@@ -1,4 +1,4 @@
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";
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
2
  import { IArcGISIdentityManagerOptions } from "@esri/arcgis-rest-request";
3
3
  export interface IUserSessionOptions extends IArcGISIdentityManagerOptions {
4
4
  }
package/dist/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  /* Copyright (c) 2018 Environmental Systems Research Institute, Inc.
2
2
  * Apache-2.0 */
3
- export { ApiKey, ApplicationSession, UserSession, exchangeToken, platformSelf, canUseOnlineToken, getOnlineEnvironment, isFederated, isOnline, normalizeOnlinePortalUrl, fetchToken, generateToken, validateAppAccess } from "@esri/arcgis-rest-request";
3
+ export { ApiKey, ApplicationSession, UserSession, exchangeToken, platformSelf, canUseOnlineToken, getOnlineEnvironment, isFederated, isOnline, normalizeOnlinePortalUrl, fetchToken, validateAppAccess } from "@esri/arcgis-rest-request";
4
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
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"]}
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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esri/arcgis-rest-auth",
3
- "version": "4.0.0-beta.3",
3
+ "version": "4.0.1",
4
4
  "description": "Authentication helpers for @esri/arcgis-rest-js.",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": [
@@ -24,6 +24,9 @@
24
24
  },
25
25
  "types": "dist/esm/index.d.ts",
26
26
  "sideEffects": false,
27
+ "files": [
28
+ "dist/**"
29
+ ],
27
30
  "scripts": {
28
31
  "build": "npm-run-all --parallel build:*",
29
32
  "postbuild": "node ../../scripts/create-dist-package-jsons.js",
@@ -41,7 +44,7 @@
41
44
  "node": ">=12.20.0"
42
45
  },
43
46
  "dependencies": {
44
- "@esri/arcgis-rest-request": "4.0.0-beta.3",
47
+ "@esri/arcgis-rest-request": "4.0.1",
45
48
  "tslib": "^2.3.0"
46
49
  },
47
50
  "contributors": [
package/.ultra.cache.json DELETED
@@ -1 +0,0 @@
1
- {"files":{"dist":"1646954462174.0808","CHANGELOG.md":"5968238579ba2065bb481939bf0a5fef8444e924","README.md":"9a12530bdf570733e0133530d2c2bb2eb99c316b","package.json":"a6b064fe3321fb483dc95caaea2b96e5bbef50f6","src/index.ts":"9dbc8d9be699dd917fc7cf33f156810d86dc6e43","tsconfig.json":"90cbf37afa22bf149841064433be84fbb7e8f5e8"},"deps":{"@esri/arcgis-rest-request":1646954461350.0762}}
package/CHANGELOG.md DELETED
@@ -1,110 +0,0 @@
1
- # @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)
2
-
3
-
4
- ### Bug Fixes
5
-
6
- * 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))
7
-
8
-
9
-
10
-
11
-
12
- ### Dependencies
13
-
14
- * **@esri/arcgis-rest-request:** upgraded to 4.0.0-beta.3
15
-
16
- # @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)
17
-
18
-
19
- ### Features
20
-
21
- * **arcgis-rest-request:** rewrite oauth 2 functions to use PKCE ([e49f88c](https://github.com/Esri/arcgis-rest-js/commit/e49f88c700694aed472733527124c4d0d54e45d6))
22
-
23
-
24
-
25
-
26
-
27
- ### Dependencies
28
-
29
- * **@esri/arcgis-rest-request:** upgraded to 4.0.0-beta.2
30
-
31
- # @esri/arcgis-rest-auth 1.0.0-beta.1 (2022-02-17)
32
-
33
-
34
- ### Bug Fixes
35
-
36
- * switch to eslint, fix minor issues, disable other rules ([ab47412](https://github.com/Esri/arcgis-rest-js/commit/ab474123d3a056dcd52a8898f39f287893626f35))
37
- * **arcgis-rest-auth:** export validateAppAccess ([6d1e2ef](https://github.com/Esri/arcgis-rest-js/commit/6d1e2ef012ca25464e6219b5d909a30e5f1cecee))
38
- * **arcgis-rest-auth:** postMessage internals ([bd8eb6c](https://github.com/Esri/arcgis-rest-js/commit/bd8eb6c0363483209645c5cc7cf19ad1a8114cc6))
39
- * **UserSession:** remove /sharing/rest from server url during postMessage auth ([04fcdbd](https://github.com/Esri/arcgis-rest-js/commit/04fcdbd5307c79e55610a1bb7e049e3e18f0f0cc))
40
- * **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)
41
- * ensure platformSelf sends cookie ([29e33cb](https://github.com/Esri/arcgis-rest-js/commit/29e33cb9b9d0a2e25e412106adb06ff054bd5737))
42
- * export app-tokens ([0171204](https://github.com/Esri/arcgis-rest-js/commit/017120498b32c9322689ad539b216ce8e5c96a3a))
43
- * export validateAppAccess function ([b087de2](https://github.com/Esri/arcgis-rest-js/commit/b087de24ae6d8f41a2bb13c3c25a33943f0db2d8))
44
- * platformSelf to send cookies and append f=json in url ([ed81919](https://github.com/Esri/arcgis-rest-js/commit/ed819194da74075172ff26139f2db4491d79ed12))
45
- * update IPlatformSelfResponse to include expires_in ([dd3557b](https://github.com/Esri/arcgis-rest-js/commit/dd3557b19514a33150db2f15138422bb219681e7))
46
- * **:bug::** ensure fix session.portal url when cred.server contains sharing/rest ([815de49](https://github.com/Esri/arcgis-rest-js/commit/815de49549b35aa9d255de6b05c2beb2d153f37f))
47
- * **: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))
48
- * **: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)
49
- * **: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)
50
- * **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)
51
- * **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))
52
- * **auth:** add additional authentication providers ([85f73b2](https://github.com/Esri/arcgis-rest-js/commit/85f73b22c17a3a3ae72b559a63df2aef8297828c))
53
- * **auth:** allow trailing slash in portal URL ([b76da90](https://github.com/Esri/arcgis-rest-js/commit/b76da902d67d4ac3635ac18eb780e7c68d7617f7))
54
- * **auth:** better regex match for usernames ([d38a7fb](https://github.com/Esri/arcgis-rest-js/commit/d38a7fb0e1bff3c49a135bc10be74893ec60a1e9))
55
- * **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)
56
- * **auth:** improve query and error handling when completing sign in ([4b3905c](https://github.com/Esri/arcgis-rest-js/commit/4b3905ca6517443c9237a44c0fc3249e579db8f5))
57
- * **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)
58
- * **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)
59
- * **lock:** pass through url and options for non-federated requests ([802006c](https://github.com/Esri/arcgis-rest-js/commit/802006cdc68e69851e80c499a236ba4c8fa1cb6f))
60
- * **oauth:** check for window parent correctly in ouath without popup ([a27bb7d](https://github.com/Esri/arcgis-rest-js/commit/a27bb7da5fa5de7ddfbc2d676b707bfa1780ecbf))
61
- * **oAuth:** fix oAuth2 methods in IE 11 and Edge ([462f980](https://github.com/Esri/arcgis-rest-js/commit/462f980082f9eeb8c55b5aa6c5981422ae40105f))
62
- * **OAuth2 options:** added locale and state parameters for browser based OAuth2 ([b05996e](https://github.com/Esri/arcgis-rest-js/commit/b05996e83b1836f9a27337939a9a681d41207504))
63
- * **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)
64
- * **release:** resolve issues from accidental 1.0.1 release. ([ddd3d6c](https://github.com/Esri/arcgis-rest-js/commit/ddd3d6cab0fb0d789da866cea07244b7a170d9fd))
65
- * **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))
66
- * **release-automation:** fix issues uncovered by 1st release ([a73b76f](https://github.com/Esri/arcgis-rest-js/commit/a73b76f58843d538d8b29b1ae60a72a9f57ac5ec))
67
- * **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)
68
- * **sharing:** rework group membership checking, fix UserSession.getUser scope issue ([909a37e](https://github.com/Esri/arcgis-rest-js/commit/909a37ec2f928ad223c674ae0d4033e24761ae9a))
69
- * **try:** try an anonymous request before throwing an auth error ([9209035](https://github.com/Esri/arcgis-rest-js/commit/9209035072b54bf68425ee9737e2a15010ac1b33))
70
- * **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)
71
- * **UserSession:** will now update expired tokens on non-federated servers ([af121c1](https://github.com/Esri/arcgis-rest-js/commit/af121c1de1c96027a2ca107ed46a7877b61c5a4f))
72
-
73
-
74
- ### Code Refactoring
75
-
76
- * change casing of IOauth2Options to IOAuth2Options ([9ffd227](https://github.com/Esri/arcgis-rest-js/commit/9ffd2277055864d5257cb7a6c9913c70079e7da5))
77
- * deprecate common-types package (in favor of common) ([6ab2e75](https://github.com/Esri/arcgis-rest-js/commit/6ab2e75a3b57ce77391da7f2a16ab57a3e781000))
78
-
79
-
80
- ### Features
81
-
82
- * **: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)
83
- * **: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)
84
- * **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)
85
- * **ApplicationSession:** only allow 1 pending request for a new token at a time ([4e6f9e2](https://github.com/Esri/arcgis-rest-js/commit/4e6f9e27d561566449ef2338b078f44d0e3b65b5))
86
- * **arcgis-rest-auth:** add postMessage auth support ([a6b8a17](https://github.com/Esri/arcgis-rest-js/commit/a6b8a17a265339725a8c5dfd90e408f28a035787))
87
- * **arcgis-rest-auth:** add validateAppAccess function and UserSession method ([2478ea5](https://github.com/Esri/arcgis-rest-js/commit/2478ea56d43302d3f7fab6ffd38a9d2c609bb510))
88
- * **arcgis-rest-auth:** reduce postMessageAuth query params ([154515f](https://github.com/Esri/arcgis-rest-js/commit/154515f66a4eedb9ee83dd8528549db55e268871))
89
- * **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)
90
- * **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)
91
- * **caring:** methods to un/share items with groups ([8572bb0](https://github.com/Esri/arcgis-rest-js/commit/8572bb0ab0222e4f0eedbe9cfd4ff00c160f0c77))
92
- * **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)
93
- * **UserSession:** added optional 'popupWindowFeatures' to 'IOAuth2Options' ([f96a581](https://github.com/Esri/arcgis-rest-js/commit/f96a581033513c9a546998bc37254a46e364f153))
94
- * **UserSession:** multiple requests to getToken for similar URLs now return the same Promise ([751e5f1](https://github.com/Esri/arcgis-rest-js/commit/751e5f19d2e6fac184a0a17cc216c54cc5c1e9f2))
95
- * **UserSession:** rename refreshTokenDuration to refreshTokenTTL ([a6406d4](https://github.com/Esri/arcgis-rest-js/commit/a6406d4d10308b266fd7ddcc6168f32419f206aa))
96
- * **util:** add getUserUrl method to auth package ([d742b34](https://github.com/Esri/arcgis-rest-js/commit/d742b343130a8a0d5baaf9391ac48f5c5c334c6d))
97
-
98
-
99
- ### BREAKING CHANGES
100
-
101
- * deprecate common-types package (in favor of common)
102
- * change casing of IOauth2Options to IOAuth2Options
103
-
104
-
105
-
106
-
107
-
108
- ### Dependencies
109
-
110
- * **@esri/arcgis-rest-request:** upgraded to 1.0.0-beta.1
package/src/index.ts DELETED
@@ -1,34 +0,0 @@
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 DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.json",
3
- "include": [
4
- "src/**/*.ts"
5
- ]
6
- }