@globus/sdk 3.3.0 → 3.4.0
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 +1 -1
- package/cjs/index.d.ts +1 -0
- package/cjs/index.d.ts.map +1 -1
- package/cjs/index.js +2 -1
- package/cjs/index.js.map +1 -1
- package/cjs/lib/apps/web.d.ts +1 -1
- package/cjs/lib/apps/web.d.ts.map +1 -1
- package/cjs/lib/apps/web.js +2 -2
- package/cjs/lib/apps/web.js.map +1 -1
- package/cjs/lib/core/authorization/AuthorizationManager.d.ts +61 -9
- package/cjs/lib/core/authorization/AuthorizationManager.d.ts.map +1 -1
- package/cjs/lib/core/authorization/AuthorizationManager.js +59 -23
- package/cjs/lib/core/authorization/AuthorizationManager.js.map +1 -1
- package/cjs/lib/core/authorization/RedirectTransport.d.ts +7 -6
- package/cjs/lib/core/authorization/RedirectTransport.d.ts.map +1 -1
- package/cjs/lib/core/authorization/RedirectTransport.js.map +1 -1
- package/cjs/lib/core/authorization/index.d.ts +7 -7
- package/cjs/lib/core/authorization/index.d.ts.map +1 -1
- package/cjs/lib/core/authorization/index.js +8 -31
- package/cjs/lib/core/authorization/index.js.map +1 -1
- package/cjs/lib/core/errors.d.ts +6 -0
- package/cjs/lib/core/errors.d.ts.map +1 -1
- package/cjs/lib/core/errors.js +6 -0
- package/cjs/lib/core/errors.js.map +1 -1
- package/cjs/lib/core/global.d.ts +1 -0
- package/cjs/lib/core/global.d.ts.map +1 -1
- package/cjs/lib/core/info/index.d.ts +23 -0
- package/cjs/lib/core/info/index.d.ts.map +1 -0
- package/cjs/lib/core/info/index.js +45 -0
- package/cjs/lib/core/info/index.js.map +1 -0
- package/cjs/lib/core/info/private.d.ts +26 -0
- package/cjs/lib/core/info/private.d.ts.map +1 -0
- package/cjs/lib/core/info/private.js +48 -0
- package/cjs/lib/core/info/private.js.map +1 -0
- package/cjs/lib/core/info/version.d.ts +2 -0
- package/cjs/lib/core/info/version.d.ts.map +1 -0
- package/cjs/lib/core/info/version.js +7 -0
- package/cjs/lib/core/info/version.js.map +1 -0
- package/cjs/lib/services/globus-connect-server/client.d.ts +30 -0
- package/cjs/lib/services/globus-connect-server/client.d.ts.map +1 -1
- package/cjs/lib/services/globus-connect-server/client.js +6 -0
- package/cjs/lib/services/globus-connect-server/client.js.map +1 -1
- package/cjs/lib/services/globus-connect-server/index.d.ts +1 -0
- package/cjs/lib/services/globus-connect-server/index.d.ts.map +1 -1
- package/cjs/lib/services/globus-connect-server/index.js +2 -1
- package/cjs/lib/services/globus-connect-server/index.js.map +1 -1
- package/cjs/lib/services/globus-connect-server/service/https.d.ts +41 -0
- package/cjs/lib/services/globus-connect-server/service/https.d.ts.map +1 -0
- package/cjs/lib/services/globus-connect-server/service/https.js +38 -0
- package/cjs/lib/services/globus-connect-server/service/https.js.map +1 -0
- package/cjs/lib/services/shared.d.ts +11 -2
- package/cjs/lib/services/shared.d.ts.map +1 -1
- package/cjs/lib/services/shared.js +23 -7
- package/cjs/lib/services/shared.js.map +1 -1
- package/cjs/lib/services/types.d.ts +2 -0
- package/cjs/lib/services/types.d.ts.map +1 -1
- package/esm/index.d.ts +1 -0
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +1 -0
- package/esm/index.js.map +1 -1
- package/esm/lib/apps/web.d.ts +1 -1
- package/esm/lib/apps/web.d.ts.map +1 -1
- package/esm/lib/apps/web.js +1 -1
- package/esm/lib/apps/web.js.map +1 -1
- package/esm/lib/core/authorization/AuthorizationManager.d.ts +61 -9
- package/esm/lib/core/authorization/AuthorizationManager.d.ts.map +1 -1
- package/esm/lib/core/authorization/AuthorizationManager.js +60 -24
- package/esm/lib/core/authorization/AuthorizationManager.js.map +1 -1
- package/esm/lib/core/authorization/RedirectTransport.d.ts +7 -6
- package/esm/lib/core/authorization/RedirectTransport.d.ts.map +1 -1
- package/esm/lib/core/authorization/RedirectTransport.js.map +1 -1
- package/esm/lib/core/authorization/index.d.ts +7 -7
- package/esm/lib/core/authorization/index.d.ts.map +1 -1
- package/esm/lib/core/authorization/index.js +7 -7
- package/esm/lib/core/authorization/index.js.map +1 -1
- package/esm/lib/core/errors.d.ts +6 -0
- package/esm/lib/core/errors.d.ts.map +1 -1
- package/esm/lib/core/errors.js +6 -0
- package/esm/lib/core/errors.js.map +1 -1
- package/esm/lib/core/global.d.ts +1 -0
- package/esm/lib/core/global.d.ts.map +1 -1
- package/esm/lib/core/info/index.d.ts +23 -0
- package/esm/lib/core/info/index.d.ts.map +1 -0
- package/esm/lib/core/info/index.js +39 -0
- package/esm/lib/core/info/index.js.map +1 -0
- package/esm/lib/core/info/private.d.ts +26 -0
- package/esm/lib/core/info/private.d.ts.map +1 -0
- package/esm/lib/core/info/private.js +41 -0
- package/esm/lib/core/info/private.js.map +1 -0
- package/esm/lib/core/info/version.d.ts +2 -0
- package/esm/lib/core/info/version.d.ts.map +1 -0
- package/esm/lib/core/info/version.js +4 -0
- package/esm/lib/core/info/version.js.map +1 -0
- package/esm/lib/services/globus-connect-server/client.d.ts +30 -0
- package/esm/lib/services/globus-connect-server/client.d.ts.map +1 -1
- package/esm/lib/services/globus-connect-server/client.js +6 -0
- package/esm/lib/services/globus-connect-server/client.js.map +1 -1
- package/esm/lib/services/globus-connect-server/index.d.ts +1 -0
- package/esm/lib/services/globus-connect-server/index.d.ts.map +1 -1
- package/esm/lib/services/globus-connect-server/index.js +1 -0
- package/esm/lib/services/globus-connect-server/index.js.map +1 -1
- package/esm/lib/services/globus-connect-server/service/https.d.ts +41 -0
- package/esm/lib/services/globus-connect-server/service/https.d.ts.map +1 -0
- package/esm/lib/services/globus-connect-server/service/https.js +35 -0
- package/esm/lib/services/globus-connect-server/service/https.js.map +1 -0
- package/esm/lib/services/shared.d.ts +11 -2
- package/esm/lib/services/shared.d.ts.map +1 -1
- package/esm/lib/services/shared.js +23 -7
- package/esm/lib/services/shared.js.map +1 -1
- package/esm/lib/services/types.d.ts +2 -0
- package/esm/lib/services/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/umd/globus.production.js +1 -1
- package/cjs/lib/core/authorization/tokens.d.ts +0 -8
- package/cjs/lib/core/authorization/tokens.d.ts.map +0 -1
- package/cjs/lib/core/authorization/tokens.js +0 -24
- package/cjs/lib/core/authorization/tokens.js.map +0 -1
- package/esm/lib/core/authorization/tokens.d.ts +0 -8
- package/esm/lib/core/authorization/tokens.d.ts.map +0 -1
- package/esm/lib/core/authorization/tokens.js +0 -20
- package/esm/lib/core/authorization/tokens.js.map +0 -1
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
The Globus SDK for JavaScript provides first class TypeScript support and makes it easy to call Globus services using idiomatic JavaScript APIs to build Node.js and web applications.
|
|
4
4
|
|
|
5
5
|
- [@globus/sdk API Documentation](https://globus.github.io/globus-sdk-javascript/)
|
|
6
|
-
- [Examples](
|
|
6
|
+
- [Examples](https://github.com/globus/globus-sdk-javascript/blob/main/examples/README.md)
|
|
7
7
|
|
|
8
8
|
## Installation
|
|
9
9
|
|
package/cjs/index.d.ts
CHANGED
package/cjs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AAOH;;GAEG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AAOH;;GAEG;AACH,OAAO,KAAK,IAAI,MAAM,0BAA0B,CAAC;AACjD,OAAO,KAAK,MAAM,MAAM,sBAAsB,CAAC;AAC/C,OAAO,KAAK,aAAa,MAAM,mCAAmC,CAAC;AACnE,OAAO,KAAK,MAAM,MAAM,sBAAsB,CAAC;AAE/C;;GAEG;AAEH,OAAO,KAAK,IAAI,MAAM,8BAA8B,CAAC;AACrD,OAAO,KAAK,QAAQ,MAAM,kCAAkC,CAAC;AAC7D,OAAO,KAAK,MAAM,MAAM,gCAAgC,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,gCAAgC,CAAC;AACzD,OAAO,KAAK,KAAK,MAAM,+BAA+B,CAAC;AACvD,OAAO,KAAK,GAAG,MAAM,+CAA+C,CAAC;AACrE,OAAO,KAAK,KAAK,MAAM,+BAA+B,CAAC;AACvD,OAAO,KAAK,OAAO,MAAM,iCAAiC,CAAC;AAE3D;;GAEG;AAEH,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC"}
|
package/cjs/index.js
CHANGED
|
@@ -76,7 +76,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
76
76
|
return result;
|
|
77
77
|
};
|
|
78
78
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
79
|
-
exports.webapp = exports.compute = exports.timer = exports.gcs = exports.flows = exports.groups = exports.search = exports.transfer = exports.auth = exports.errors = exports.authorization = exports.logger = void 0;
|
|
79
|
+
exports.webapp = exports.compute = exports.timer = exports.gcs = exports.flows = exports.groups = exports.search = exports.transfer = exports.auth = exports.errors = exports.authorization = exports.logger = exports.info = void 0;
|
|
80
80
|
/// <reference types="@globus/types" />
|
|
81
81
|
/// <reference types="@globus/types/auth" />
|
|
82
82
|
/// <reference types="@globus/types/transfer" />
|
|
@@ -84,6 +84,7 @@ exports.webapp = exports.compute = exports.timer = exports.gcs = exports.flows =
|
|
|
84
84
|
/**
|
|
85
85
|
* Core
|
|
86
86
|
*/
|
|
87
|
+
exports.info = __importStar(require("./lib/core/info/index.js"));
|
|
87
88
|
exports.logger = __importStar(require("./lib/core/logger.js"));
|
|
88
89
|
exports.authorization = __importStar(require("./lib/core/authorization/index.js"));
|
|
89
90
|
exports.errors = __importStar(require("./lib/core/errors.js"));
|
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAuC;AACvC,4CAA4C;AAC5C,gDAAgD;AAChD,8CAA8C;AAE9C;;GAEG;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAuC;AACvC,4CAA4C;AAC5C,gDAAgD;AAChD,8CAA8C;AAE9C;;GAEG;AACH,iEAAiD;AACjD,+DAA+C;AAC/C,mFAAmE;AACnE,+DAA+C;AAE/C;;GAEG;AAEH,qEAAqD;AACrD,6EAA6D;AAC7D,yEAAyD;AACzD,yEAAyD;AACzD,uEAAuD;AACvD,qFAAqE;AACrE,uEAAuD;AACvD,2EAA2D;AAE3D;;GAEG;AAEH,4DAA4C"}
|
package/cjs/lib/apps/web.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Utilities and methods related to the Globus Web App.
|
|
3
3
|
* @see https://app.globus.org/
|
|
4
4
|
*/
|
|
5
|
-
import { type Environment } from '../core/global';
|
|
5
|
+
import { type Environment } from '../core/global.js';
|
|
6
6
|
import type { SDKOptions } from '../services/types';
|
|
7
7
|
/**
|
|
8
8
|
* The hostnames for the Globus Web App in each environment.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.d.ts","sourceRoot":"","sources":["../../../../src/lib/apps/web.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAkB,KAAK,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"web.d.ts","sourceRoot":"","sources":["../../../../src/lib/apps/web.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAkB,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD;;GAEG;AACH,eAAO,MAAM,KAAK,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAO7C,CAAC;AAEF;;GAEG;AACH,wBAAgB,IAAI,CAAC,GAAG,GAAE,WAA8B,UAEvD;AAED;;GAEG;AACH,wBAAgB,GAAG,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,UAAU,OAEzD;AAED,KAAK,mBAAmB,GAAG,MAAM,GAAG,YAAY,GAAG,UAAU,CAAC;AAQ9D;;;;;;GAMG;AACH,wBAAgB,MAAM,CACpB,UAAU,EAAE,mBAAmB,EAC/B,QAAQ,CAAC,EAAE,MAAM,EAAE,EACnB,UAAU,CAAC,EAAE,UAAU,OAIxB"}
|
package/cjs/lib/apps/web.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.urlFor = exports.url = exports.host = exports.HOSTS = void 0;
|
|
8
|
-
const
|
|
8
|
+
const global_js_1 = require("../core/global.js");
|
|
9
9
|
/**
|
|
10
10
|
* The hostnames for the Globus Web App in each environment.
|
|
11
11
|
*/
|
|
@@ -20,7 +20,7 @@ exports.HOSTS = {
|
|
|
20
20
|
/**
|
|
21
21
|
* Return the hostname for the Globus Web App in the given environment.
|
|
22
22
|
*/
|
|
23
|
-
function host(env = (0,
|
|
23
|
+
function host(env = (0, global_js_1.getEnvironment)()) {
|
|
24
24
|
return exports.HOSTS[env];
|
|
25
25
|
}
|
|
26
26
|
exports.host = host;
|
package/cjs/lib/apps/web.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../../../src/lib/apps/web.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../../../src/lib/apps/web.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,iDAAqE;AAGrE;;GAEG;AACU,QAAA,KAAK,GAAgC;IAChD,WAAW,EAAE,+BAA+B;IAC5C,OAAO,EAAE,2BAA2B;IACpC,IAAI,EAAE,wBAAwB;IAC9B,OAAO,EAAE,2BAA2B;IACpC,OAAO,EAAE,wBAAwB;IACjC,UAAU,EAAE,gBAAgB;CAC7B,CAAC;AAEF;;GAEG;AACH,SAAgB,IAAI,CAAC,MAAmB,IAAA,0BAAc,GAAE;IACtD,OAAO,aAAK,CAAC,GAAG,CAAC,CAAC;AACpB,CAAC;AAFD,oBAEC;AAED;;GAEG;AACH,SAAgB,GAAG,CAAC,IAAa,EAAE,UAAuB;IACxD,OAAO,IAAI,GAAG,CAAC,IAAI,IAAI,EAAE,EAAE,WAAW,IAAI,CAAC,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,WAAW,CAAC,EAAE,CAAC,CAAC;AACzE,CAAC;AAFD,kBAEC;AAID,MAAM,WAAW,GAAwC;IACvD,IAAI,EAAE,uBAAuB;IAC7B,UAAU,EAAE,uCAAuC;IACnD,QAAQ,EAAE,uCAAuC;CAClD,CAAC;AAEF;;;;;;GAMG;AACH,SAAgB,MAAM,CACpB,UAA+B,EAC/B,QAAmB,EACnB,UAAuB;IAEvB,MAAM,IAAI,GAAG,WAAW,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,IAAI,CAAC,GAAG,CAAC,KAAI,EAAE,CAAC,CAAC;IAC/E,OAAO,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;AAC/B,CAAC;AAPD,wBAOC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type IConfig from 'js-pkce/dist/IConfig';
|
|
2
2
|
import { Event } from './Event.js';
|
|
3
|
-
import { GetTokenOptions } from './RedirectTransport.js';
|
|
3
|
+
import { RedirectTransportOptions, GetTokenOptions } from './RedirectTransport.js';
|
|
4
4
|
import { TokenLookup } from './TokenLookup.js';
|
|
5
5
|
import { AuthorizationRequirementsError, ConsentRequiredError } from '../errors.js';
|
|
6
6
|
import type { JwtUserInfo, Token, TokenResponse, TokenWithRefresh } from '../../services/auth/types.js';
|
|
@@ -20,7 +20,35 @@ export type AuthorizationManagerConfiguration = {
|
|
|
20
20
|
defaultScopes?: string | false;
|
|
21
21
|
};
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* Provides management of Globus authorization context for your application.
|
|
24
|
+
* - Handles the OAuth protcol flow (via PKCE)
|
|
25
|
+
* - Token lifecycle management
|
|
26
|
+
* - Common errors (e.g., `ConsentRequired`, `authorization_requirements`)
|
|
27
|
+
*
|
|
28
|
+
* Once you configure your instance, you can determine the authenticated state using `manager.authenticated`.
|
|
29
|
+
*
|
|
30
|
+
* To prompt a user to authenticate, call `manager.login()` on user interaction – this will initiate the OAuth protocol flow with your configured client and scopes, resulting in an initial redirect to Globus Auth.
|
|
31
|
+
*
|
|
32
|
+
* Once the user authenticates with Globus Auth, they will be redirected to your application using the configured `redirect` URL. On this URL, you will need to call `manager.handleCodeRedirect` (using a manager instance configured in the same manner that initiated the `manager.login()` call) to complete the PKCE flow, exchanging the provided code for a valid token, or tokens.
|
|
33
|
+
*
|
|
34
|
+
* All tokens managed by the `AuthorizationManager` instance can be found on `manager.token`.
|
|
35
|
+
*
|
|
36
|
+
* ### Registering your Globus Application
|
|
37
|
+
*
|
|
38
|
+
* The `AuthorizationManager` expects your Globus Application to be registered as an OAuth public client.
|
|
39
|
+
* In this Globus Web Application, this option is referenced as "_Register a thick client or script that will be installed and run by users on their devices_".
|
|
40
|
+
*
|
|
41
|
+
* @example <caption>Creating an AuthorizationManager instance.</caption>
|
|
42
|
+
* import { authorization } from "globus/sdk";
|
|
43
|
+
*
|
|
44
|
+
* const manager = authorization.create({
|
|
45
|
+
* // Your registered Globus Application client ID.
|
|
46
|
+
* client_id: '...',
|
|
47
|
+
* // The redirect URL for your application; Where you will call `manager.handleCodeRedirect()`
|
|
48
|
+
* redirect: 'https://example.com/callback',
|
|
49
|
+
* // Known scopes required by your application.
|
|
50
|
+
* scopes: 'urn:globus:auth:scope:transfer.api.globus.org:all',
|
|
51
|
+
* });
|
|
24
52
|
*/
|
|
25
53
|
export declare class AuthorizationManager {
|
|
26
54
|
#private;
|
|
@@ -80,7 +108,13 @@ export declare class AuthorizationManager {
|
|
|
80
108
|
* @param token The well-formed token with a `refresh_token` attribute.
|
|
81
109
|
*/
|
|
82
110
|
refreshToken(token: TokenWithRefresh): Promise<void>;
|
|
111
|
+
/**
|
|
112
|
+
* Whether or not the instance has a reference to a Globus Auth token.
|
|
113
|
+
*/
|
|
83
114
|
hasGlobusAuthToken(): boolean;
|
|
115
|
+
/**
|
|
116
|
+
* Retrieve the Globus Auth token managed by the instance.
|
|
117
|
+
*/
|
|
84
118
|
getGlobusAuthToken(): any;
|
|
85
119
|
/**
|
|
86
120
|
* Reset the authenticated state and clear all tokens from storage.
|
|
@@ -90,29 +124,47 @@ export declare class AuthorizationManager {
|
|
|
90
124
|
/**
|
|
91
125
|
* Initiate the login process by redirecting to the Globus Auth login page.
|
|
92
126
|
*/
|
|
93
|
-
login(
|
|
127
|
+
login(options?: {
|
|
128
|
+
additionalParams: {};
|
|
129
|
+
}): void;
|
|
130
|
+
/**
|
|
131
|
+
* This method will attempt to complete the PKCE protocol flow.
|
|
132
|
+
*/
|
|
94
133
|
handleCodeRedirect(options?: {
|
|
95
134
|
shouldReplace: GetTokenOptions['shouldReplace'];
|
|
135
|
+
additionalParams?: RedirectTransportOptions['params'];
|
|
96
136
|
}): Promise<void>;
|
|
97
137
|
/**
|
|
98
138
|
* Handle an error response from a Globus service in the context of this `AuthorizationManager`.
|
|
99
139
|
* This method will introspect the response and attempt to handle any errors that should result
|
|
100
140
|
* in some additional Globus Auth interaction.
|
|
101
|
-
* @param response
|
|
102
|
-
* @param
|
|
141
|
+
* @param response The error response from a Globus service.
|
|
142
|
+
* @param {object|boolean} options Options for handling the error response. If a boolean is provided, this will be treated as the `options.execute` value.
|
|
143
|
+
* @param options.execute Whether to execute the handler immediately.
|
|
144
|
+
* @param options.additionalParms Additional query parameters to be included with the transport generated URL.
|
|
103
145
|
*/
|
|
104
|
-
handleErrorResponse(response: Record<string, unknown>,
|
|
105
|
-
|
|
146
|
+
handleErrorResponse(response: Record<string, unknown>, options?: {
|
|
147
|
+
execute?: true;
|
|
148
|
+
additionalParams?: RedirectTransportOptions['params'];
|
|
149
|
+
} | true): void;
|
|
150
|
+
handleErrorResponse(response: Record<string, unknown>, options?: {
|
|
151
|
+
execute?: false;
|
|
152
|
+
additionalParams?: RedirectTransportOptions['params'];
|
|
153
|
+
} | false): () => void;
|
|
106
154
|
/**
|
|
107
155
|
* Process a well-formed Authorization Requirements error response from a Globus service
|
|
108
156
|
* and redirect the user to the Globus Auth login page with the necessary parameters.
|
|
109
157
|
*/
|
|
110
|
-
handleAuthorizationRequirementsError(response: AuthorizationRequirementsError
|
|
158
|
+
handleAuthorizationRequirementsError(response: AuthorizationRequirementsError, options?: {
|
|
159
|
+
additionalParams?: RedirectTransportOptions['params'];
|
|
160
|
+
}): void;
|
|
111
161
|
/**
|
|
112
162
|
* Process a well-formed `ConsentRequired` error response from a Globus service
|
|
113
163
|
* and redirect the user to the Globus Auth login page with the necessary parameters.
|
|
114
164
|
*/
|
|
115
|
-
handleConsentRequiredError(response: ConsentRequiredError
|
|
165
|
+
handleConsentRequiredError(response: ConsentRequiredError, options?: {
|
|
166
|
+
additionalParams?: RedirectTransportOptions['params'];
|
|
167
|
+
}): void;
|
|
116
168
|
/**
|
|
117
169
|
* Add a Globus Auth token response to storage, if `other_tokens` are present they are also added.
|
|
118
170
|
* This method is mostly used internally by the `AuthorizationManager`, but can be used by downstream
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthorizationManager.d.ts","sourceRoot":"","sources":["../../../../../src/lib/core/authorization/AuthorizationManager.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AuthorizationManager.d.ts","sourceRoot":"","sources":["../../../../../src/lib/core/authorization/AuthorizationManager.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAahD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EACL,wBAAwB,EACxB,eAAe,EAEhB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAGL,8BAA8B,EAC9B,oBAAoB,EACrB,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EACV,WAAW,EACX,KAAK,EACL,aAAa,EACb,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAEtC,MAAM,MAAM,iCAAiC,GAAG;IAC9C,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACrC,QAAQ,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IAClC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;CAChC,CAAC;AAYF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,qBAAa,oBAAoB;;IAG/B,aAAa,EAAE,iCAAiC,CAAC;IAIjD;;;OAGG;IACH,IAAI,aAAa,IAOQ,OAAO,CAL/B;IAED;;OAEG;IACH,IAAI,aAAa,CAAC,KAAK,EAAE,OAAO,EAG/B;IAED,MAAM,EAAE,WAAW,CAAC;IAEpB,MAAM;QACJ;;;;;;WAMG;;YAIC;;;eAGG;6BACc,OAAO;;;QAI5B;;;WAGG;;MAEH;gBAEU,aAAa,EAAE,iCA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BAAgB,UAAW,KAAK,GAAG,aAAa,UAM9C;IAEF;;;;OAIG;IACG,MAAM;CAoBb"}
|
|
@@ -22,10 +22,6 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
|
|
|
22
22
|
var _AuthorizationManager_instances, _AuthorizationManager_transport, _AuthorizationManager_authenticated, _AuthorizationManager_silentRefreshTokens, _AuthorizationManager_checkAuthorizationState, _AuthorizationManager_bootstrapFromStorageState, _AuthorizationManager_emitAuthenticatedState, _AuthorizationManager_withOfflineAccess, _AuthorizationManager_buildTransport, _AuthorizationManager_revokeToken;
|
|
23
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
24
|
exports.AuthorizationManager = void 0;
|
|
25
|
-
/**
|
|
26
|
-
* @module Authorization
|
|
27
|
-
* @group Core
|
|
28
|
-
*/
|
|
29
25
|
const jwt_decode_1 = require("jwt-decode");
|
|
30
26
|
const index_js_1 = require("../../services/auth/index.js");
|
|
31
27
|
const index_js_2 = require("../storage/index.js");
|
|
@@ -38,8 +34,40 @@ const DEFAULT_CONFIGURATION = {
|
|
|
38
34
|
useRefreshTokens: false,
|
|
39
35
|
defaultScopes: 'openid profile email',
|
|
40
36
|
};
|
|
37
|
+
const DEFAULT_HANDLE_ERROR_OPTIONS = {
|
|
38
|
+
execute: true,
|
|
39
|
+
additionalParams: undefined,
|
|
40
|
+
};
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
42
|
+
* Provides management of Globus authorization context for your application.
|
|
43
|
+
* - Handles the OAuth protcol flow (via PKCE)
|
|
44
|
+
* - Token lifecycle management
|
|
45
|
+
* - Common errors (e.g., `ConsentRequired`, `authorization_requirements`)
|
|
46
|
+
*
|
|
47
|
+
* Once you configure your instance, you can determine the authenticated state using `manager.authenticated`.
|
|
48
|
+
*
|
|
49
|
+
* To prompt a user to authenticate, call `manager.login()` on user interaction – this will initiate the OAuth protocol flow with your configured client and scopes, resulting in an initial redirect to Globus Auth.
|
|
50
|
+
*
|
|
51
|
+
* Once the user authenticates with Globus Auth, they will be redirected to your application using the configured `redirect` URL. On this URL, you will need to call `manager.handleCodeRedirect` (using a manager instance configured in the same manner that initiated the `manager.login()` call) to complete the PKCE flow, exchanging the provided code for a valid token, or tokens.
|
|
52
|
+
*
|
|
53
|
+
* All tokens managed by the `AuthorizationManager` instance can be found on `manager.token`.
|
|
54
|
+
*
|
|
55
|
+
* ### Registering your Globus Application
|
|
56
|
+
*
|
|
57
|
+
* The `AuthorizationManager` expects your Globus Application to be registered as an OAuth public client.
|
|
58
|
+
* In this Globus Web Application, this option is referenced as "_Register a thick client or script that will be installed and run by users on their devices_".
|
|
59
|
+
*
|
|
60
|
+
* @example <caption>Creating an AuthorizationManager instance.</caption>
|
|
61
|
+
* import { authorization } from "globus/sdk";
|
|
62
|
+
*
|
|
63
|
+
* const manager = authorization.create({
|
|
64
|
+
* // Your registered Globus Application client ID.
|
|
65
|
+
* client_id: '...',
|
|
66
|
+
* // The redirect URL for your application; Where you will call `manager.handleCodeRedirect()`
|
|
67
|
+
* redirect: 'https://example.com/callback',
|
|
68
|
+
* // Known scopes required by your application.
|
|
69
|
+
* scopes: 'urn:globus:auth:scope:transfer.api.globus.org:all',
|
|
70
|
+
* });
|
|
43
71
|
*/
|
|
44
72
|
class AuthorizationManager {
|
|
45
73
|
/**
|
|
@@ -166,9 +194,15 @@ class AuthorizationManager {
|
|
|
166
194
|
}
|
|
167
195
|
});
|
|
168
196
|
}
|
|
197
|
+
/**
|
|
198
|
+
* Whether or not the instance has a reference to a Globus Auth token.
|
|
199
|
+
*/
|
|
169
200
|
hasGlobusAuthToken() {
|
|
170
201
|
return this.getGlobusAuthToken() !== null;
|
|
171
202
|
}
|
|
203
|
+
/**
|
|
204
|
+
* Retrieve the Globus Auth token managed by the instance.
|
|
205
|
+
*/
|
|
172
206
|
getGlobusAuthToken() {
|
|
173
207
|
const entry = (0, index_js_2.getStorage)().get(`${this.storageKeyPrefix}auth.globus.org`);
|
|
174
208
|
return entry ? JSON.parse(entry) : null;
|
|
@@ -190,19 +224,22 @@ class AuthorizationManager {
|
|
|
190
224
|
/**
|
|
191
225
|
* Initiate the login process by redirecting to the Globus Auth login page.
|
|
192
226
|
*/
|
|
193
|
-
login() {
|
|
227
|
+
login(options = { additionalParams: {} }) {
|
|
194
228
|
(0, logger_js_1.log)('debug', 'AuthorizationManager.login');
|
|
195
229
|
this.reset();
|
|
196
230
|
/**
|
|
197
231
|
* In the future, it's possible that we may want to support different types of transports.
|
|
198
232
|
*/
|
|
199
|
-
const transport = __classPrivateFieldGet(this, _AuthorizationManager_instances, "m", _AuthorizationManager_buildTransport).call(this);
|
|
233
|
+
const transport = __classPrivateFieldGet(this, _AuthorizationManager_instances, "m", _AuthorizationManager_buildTransport).call(this, { params: options === null || options === void 0 ? void 0 : options.additionalParams });
|
|
200
234
|
transport.send();
|
|
201
235
|
}
|
|
236
|
+
/**
|
|
237
|
+
* This method will attempt to complete the PKCE protocol flow.
|
|
238
|
+
*/
|
|
202
239
|
handleCodeRedirect() {
|
|
203
|
-
return __awaiter(this, arguments, void 0, function* (options = { shouldReplace: true }) {
|
|
240
|
+
return __awaiter(this, arguments, void 0, function* (options = { shouldReplace: true, additionalParams: {} }) {
|
|
204
241
|
(0, logger_js_1.log)('debug', 'AuthorizationManager.handleCodeRedirect');
|
|
205
|
-
const response = yield __classPrivateFieldGet(this, _AuthorizationManager_instances, "m", _AuthorizationManager_buildTransport).call(this).getToken({
|
|
242
|
+
const response = yield __classPrivateFieldGet(this, _AuthorizationManager_instances, "m", _AuthorizationManager_buildTransport).call(this, { params: options === null || options === void 0 ? void 0 : options.additionalParams }).getToken({
|
|
206
243
|
shouldReplace: options === null || options === void 0 ? void 0 : options.shouldReplace,
|
|
207
244
|
});
|
|
208
245
|
if ((0, index_js_1.isGlobusAuthTokenResponse)(response)) {
|
|
@@ -211,36 +248,34 @@ class AuthorizationManager {
|
|
|
211
248
|
}
|
|
212
249
|
});
|
|
213
250
|
}
|
|
214
|
-
handleErrorResponse(response,
|
|
215
|
-
|
|
251
|
+
handleErrorResponse(response, options) {
|
|
252
|
+
const opts = typeof options === 'boolean'
|
|
253
|
+
? Object.assign(Object.assign({}, DEFAULT_HANDLE_ERROR_OPTIONS), { execute: options }) : Object.assign(Object.assign({}, DEFAULT_HANDLE_ERROR_OPTIONS), options);
|
|
254
|
+
(0, logger_js_1.log)('debug', `AuthorizationManager.handleErrorResponse | response=${JSON.stringify(response)} execute=${opts.execute}`);
|
|
216
255
|
let handler = () => { };
|
|
217
256
|
if ((0, errors_js_1.isAuthorizationRequirementsError)(response)) {
|
|
218
257
|
(0, logger_js_1.log)('debug', 'AuthorizationManager.handleErrorResponse | error=AuthorizationRequirementsError');
|
|
219
|
-
handler = () => this.handleAuthorizationRequirementsError(response
|
|
258
|
+
handler = () => this.handleAuthorizationRequirementsError(response, {
|
|
259
|
+
additionalParams: opts.additionalParams,
|
|
260
|
+
});
|
|
220
261
|
}
|
|
221
262
|
if ((0, errors_js_1.isConsentRequiredError)(response)) {
|
|
222
263
|
(0, logger_js_1.log)('debug', 'AuthorizationManager.handleErrorResponse | error=ConsentRequiredError');
|
|
223
|
-
handler = () => this.handleConsentRequiredError(response);
|
|
264
|
+
handler = () => this.handleConsentRequiredError(response, { additionalParams: opts.additionalParams });
|
|
224
265
|
}
|
|
225
266
|
if ('code' in response && response['code'] === 'AuthenticationFailed') {
|
|
226
267
|
(0, logger_js_1.log)('debug', 'AuthorizationManager.handleErrorResponse | error=AuthenticationFailed');
|
|
227
268
|
handler = () => this.revoke();
|
|
228
269
|
}
|
|
229
|
-
return execute === true ? handler() : handler;
|
|
270
|
+
return opts.execute === true ? handler() : handler;
|
|
230
271
|
}
|
|
231
272
|
/**
|
|
232
273
|
* Process a well-formed Authorization Requirements error response from a Globus service
|
|
233
274
|
* and redirect the user to the Globus Auth login page with the necessary parameters.
|
|
234
275
|
*/
|
|
235
|
-
handleAuthorizationRequirementsError(response) {
|
|
276
|
+
handleAuthorizationRequirementsError(response, options) {
|
|
236
277
|
__classPrivateFieldSet(this, _AuthorizationManager_transport, __classPrivateFieldGet(this, _AuthorizationManager_instances, "m", _AuthorizationManager_buildTransport).call(this, {
|
|
237
|
-
params: {
|
|
238
|
-
session_message: response.authorization_parameters.session_message,
|
|
239
|
-
session_required_identities: response.authorization_parameters.session_required_identities.join(','),
|
|
240
|
-
session_required_mfa: response.authorization_parameters.session_required_mfa,
|
|
241
|
-
session_required_single_domain: response.authorization_parameters.session_required_single_domain.join(','),
|
|
242
|
-
prompt: 'login',
|
|
243
|
-
},
|
|
278
|
+
params: Object.assign({ session_message: response.authorization_parameters.session_message, session_required_identities: response.authorization_parameters.session_required_identities.join(','), session_required_mfa: response.authorization_parameters.session_required_mfa, session_required_single_domain: response.authorization_parameters.session_required_single_domain.join(','), prompt: 'login' }, options === null || options === void 0 ? void 0 : options.additionalParams),
|
|
244
279
|
}), "f");
|
|
245
280
|
__classPrivateFieldGet(this, _AuthorizationManager_transport, "f").send();
|
|
246
281
|
}
|
|
@@ -248,9 +283,10 @@ class AuthorizationManager {
|
|
|
248
283
|
* Process a well-formed `ConsentRequired` error response from a Globus service
|
|
249
284
|
* and redirect the user to the Globus Auth login page with the necessary parameters.
|
|
250
285
|
*/
|
|
251
|
-
handleConsentRequiredError(response) {
|
|
286
|
+
handleConsentRequiredError(response, options) {
|
|
252
287
|
__classPrivateFieldSet(this, _AuthorizationManager_transport, __classPrivateFieldGet(this, _AuthorizationManager_instances, "m", _AuthorizationManager_buildTransport).call(this, {
|
|
253
288
|
requested_scopes: __classPrivateFieldGet(this, _AuthorizationManager_instances, "m", _AuthorizationManager_withOfflineAccess).call(this, response.required_scopes.join(' ')),
|
|
289
|
+
params: Object.assign({}, options === null || options === void 0 ? void 0 : options.additionalParams),
|
|
254
290
|
}), "f");
|
|
255
291
|
__classPrivateFieldGet(this, _AuthorizationManager_transport, "f").send();
|
|
256
292
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthorizationManager.js","sourceRoot":"","sources":["../../../../../src/lib/core/authorization/AuthorizationManager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA
|
|
1
|
+
{"version":3,"file":"AuthorizationManager.js","sourceRoot":"","sources":["../../../../../src/lib/core/authorization/AuthorizationManager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAuC;AAIvC,2DAMsC;AAEtC,kDAAgE;AAChE,4CAAmC;AAEnC,yCAAmC;AACnC,iEAIgC;AAChC,qDAA+C;AAE/C,4CAKsB;AAyBtB,MAAM,qBAAqB,GAAG;IAC5B,gBAAgB,EAAE,KAAK;IACvB,aAAa,EAAE,sBAAsB;CACtC,CAAC;AAEF,MAAM,4BAA4B,GAAG;IACnC,OAAO,EAAE,IAAI;IACb,gBAAgB,EAAE,SAAS;CAC5B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAa,oBAAoB;IAO/B;;;OAGG;IACH,IAAI,aAAa;QACf,OAAO,uBAAA,IAAI,2CAAe,CAAC;IAC7B,CAAC;IAED;;OAEG;IACH,IAAI,aAAa,CAAC,KAAc;QAC9B,uBAAA,IAAI,uCAAkB,KAAK,MAAA,CAAC;QAC5B,uBAAA,IAAI,qFAAwB,MAA5B,IAAI,CAA0B,CAAC;IACjC,CAAC;IA8BD,YAAY,aAAgD;;;QAlD5D,kDAA+B;QAI/B,8CAAiB,KAAK,EAAC;QAoBvB,WAAM,GAAG;YACP;;;;;;eAMG;YACH,aAAa,EAAE,IAAI,gBAAK,CAUtB,eAAe,CAAC;YAClB;;;eAGG;YACH,MAAM,EAAE,IAAI,gBAAK,CAAC,QAAQ,CAAC;SAC5B,CAAC;QA4TF;;;;WAIG;QACH,qBAAgB,GAAG,CAAC,KAA4B,EAAE,EAAE;;YAClD,IAAA,qBAAU,GAAE,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,IAAI,KAAK,CAAC,eAAe,EAAE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aAAa,CAAC,QAAQ,CAAC;YACvC,eAAe;YACf,KAAK;SACN,CAAC,CAAC;IACL,CAAC;8FAqBkB,MAAc;IAC/B,OAAO,GAAG,MAAM,GAAG,IAAI,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;AACpF,CAAC,uFAEe,SAAuE;;IACrF,MAAM,MAAM,GAAG,uBAAA,IAAI,gFAAmB,MAAvB,IAAI,EACjB,MAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,gBAAgB,mCAAI,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,IAAI,EAAE,CAAC,CACjE,CAAC;IAEF,OAAO,IAAI,wCAAiB,iBAC1B,SAAS,EAAE,IAAI,CAAC,aAAa,CAAC,MAAM,EACpC,sBAAsB,EAAE,IAAA,mCAAwB,GAAE,EAClD,cAAc,EAAE,IAAA,2BAAgB,GAAE,EAClC,YAAY,EAAE,IAAI,CAAC,aAAa,CAAC,QAAQ,EACzC,gBAAgB,EAAE,MAAM,IACrB,SAAS,EAMZ,CAAC;AACL,CAAC,iFAsKY,KAAY;IACvB,IAAA,eAAG,EAAC,OAAO,EAAE,sDAAsD,KAAK,CAAC,eAAe,EAAE,CAAC,CAAC;IAC5F,OAAO,iBAAM,CAAC,KAAK,CAAC,MAAM,CAAC;QACzB,OAAO,EAAE;YACP,SAAS,EAAE,IAAI,CAAC,aAAa,CAAC,MAAM;YACpC,KAAK,EAAE,KAAK,CAAC,YAAY;SAC1B;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -7,14 +7,15 @@ export type GetTokenOptions = {
|
|
|
7
7
|
*/
|
|
8
8
|
shouldReplace?: boolean;
|
|
9
9
|
};
|
|
10
|
+
export type RedirectTransportOptions = IConfig & {
|
|
11
|
+
/**
|
|
12
|
+
* Additional parameters to be included in the query string of the authorization request.
|
|
13
|
+
*/
|
|
14
|
+
params?: IObject;
|
|
15
|
+
};
|
|
10
16
|
export declare class RedirectTransport {
|
|
11
17
|
#private;
|
|
12
|
-
constructor(options:
|
|
13
|
-
/**
|
|
14
|
-
* Additional parameters to be included in the query string of the authorization request.
|
|
15
|
-
*/
|
|
16
|
-
params?: IObject;
|
|
17
|
-
});
|
|
18
|
+
constructor(options: RedirectTransportOptions);
|
|
18
19
|
send(): void;
|
|
19
20
|
/**
|
|
20
21
|
* Parse the current URL for the authorization code (`?code=...`) and exchange it for an access token when available.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RedirectTransport.d.ts","sourceRoot":"","sources":["../../../../../src/lib/core/authorization/RedirectTransport.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAEhD,MAAM,MAAM,eAAe,GAAG;IAC5B;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,
|
|
1
|
+
{"version":3,"file":"RedirectTransport.d.ts","sourceRoot":"","sources":["../../../../../src/lib/core/authorization/RedirectTransport.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAEhD,MAAM,MAAM,eAAe,GAAG;IAC5B;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,OAAO,GAAG;IAC/C;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,qBAAa,iBAAiB;;gBAKhB,OAAO,EAAE,wBAAwB;IAU7C,IAAI;IAIJ;;;OAGG;IACG,QAAQ,CAAC,OAAO,GAAE,eAAyC;CA+BlE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RedirectTransport.js","sourceRoot":"","sources":["../../../../../src/lib/core/authorization/RedirectTransport.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sDAA2B;
|
|
1
|
+
{"version":3,"file":"RedirectTransport.js","sourceRoot":"","sources":["../../../../../src/lib/core/authorization/RedirectTransport.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sDAA2B;AAmB3B,MAAa,iBAAiB;IAK5B,YAAY,OAAiC;QAJ7C,0CAAY;QAEZ,oCAA8C,EAAE,EAAC;QAG/C,MAAM,EAAE,MAAM,KAAgB,OAAO,EAAlB,MAAM,UAAK,OAAO,EAA/B,UAAqB,CAAU,CAAC;QACtC,uBAAA,IAAI,2BAAS,IAAI,iBAAI,mBAChB,MAAM,EACT,MAAA,CAAC;QACH,uBAAA,IAAI,+CACC,MAAM,OACV,CAAC;IACJ,CAAC;IAED,IAAI;QACF,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,uBAAA,IAAI,+BAAM,CAAC,YAAY,CAAC,uBAAA,IAAI,iCAAQ,CAAC,CAAC,CAAC;IACjE,CAAC;IAED;;;OAGG;IACG,QAAQ;6DAAC,UAA2B,EAAE,aAAa,EAAE,IAAI,EAAE;YAC/D,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YAC1C,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YAC/C;;eAEG;YACH,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC;gBAAE,OAAO,SAAS,CAAC;YAC1C,MAAM,QAAQ,GAAG,MAAM,uBAAA,IAAI,+BAAM,CAAC,sBAAsB,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;YACzE;;;eAGG;YACH,cAAc,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;YACxC,cAAc,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;YAChD,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;gBAC1B;;mBAEG;gBACH,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;gBACtB,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;gBACvB;;mBAEG;gBACH,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC;gBAC/B;;mBAEG;gBACH,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YAC/B,CAAC;YACD,OAAO,QAAQ,CAAC;QAClB,CAAC;KAAA;CACF;AAtDD,8CAsDC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { AuthorizationManager, type AuthorizationManagerConfiguration } from './AuthorizationManager.js';
|
|
2
|
-
import * as tokens from './tokens.js';
|
|
3
|
-
export * as tokens from './tokens.js';
|
|
4
1
|
/**
|
|
5
|
-
* @
|
|
2
|
+
* @module Authorization
|
|
3
|
+
* @description Provides modules for interacting with Globus-related authorization contexts in your application.
|
|
4
|
+
* @example
|
|
5
|
+
* import { authorization } from "globus/sdk";
|
|
6
|
+
* const manager = authorization.create(...);
|
|
6
7
|
*/
|
|
7
|
-
|
|
8
|
+
import { AuthorizationManager, type AuthorizationManagerConfiguration } from './AuthorizationManager.js';
|
|
8
9
|
/**
|
|
9
|
-
* Create an instance of the AuthorizationManager.
|
|
10
|
-
* @experimental
|
|
10
|
+
* Create an instance of the {@link AuthorizationManager}.
|
|
11
11
|
*/
|
|
12
12
|
export declare function create(configuration: AuthorizationManagerConfiguration): AuthorizationManager;
|
|
13
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/core/authorization/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,KAAK,iCAAiC,EACvC,MAAM,2BAA2B,CAAC;AAEnC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/core/authorization/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EACL,oBAAoB,EACpB,KAAK,iCAAiC,EACvC,MAAM,2BAA2B,CAAC;AAEnC;;GAEG;AACH,wBAAgB,MAAM,CAAC,aAAa,EAAE,iCAAiC,wBAEtE"}
|
|
@@ -1,39 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.create =
|
|
27
|
-
const AuthorizationManager_js_1 = require("./AuthorizationManager.js");
|
|
28
|
-
const tokens = __importStar(require("./tokens.js"));
|
|
29
|
-
exports.tokens = __importStar(require("./tokens.js"));
|
|
3
|
+
exports.create = void 0;
|
|
30
4
|
/**
|
|
31
|
-
* @
|
|
5
|
+
* @module Authorization
|
|
6
|
+
* @description Provides modules for interacting with Globus-related authorization contexts in your application.
|
|
7
|
+
* @example
|
|
8
|
+
* import { authorization } from "globus/sdk";
|
|
9
|
+
* const manager = authorization.create(...);
|
|
32
10
|
*/
|
|
33
|
-
|
|
11
|
+
const AuthorizationManager_js_1 = require("./AuthorizationManager.js");
|
|
34
12
|
/**
|
|
35
|
-
* Create an instance of the AuthorizationManager.
|
|
36
|
-
* @experimental
|
|
13
|
+
* Create an instance of the {@link AuthorizationManager}.
|
|
37
14
|
*/
|
|
38
15
|
function create(configuration) {
|
|
39
16
|
return new AuthorizationManager_js_1.AuthorizationManager(configuration);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/core/authorization/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/core/authorization/index.ts"],"names":[],"mappings":";;;AAAA;;;;;;GAMG;AACH,uEAGmC;AAEnC;;GAEG;AACH,SAAgB,MAAM,CAAC,aAAgD;IACrE,OAAO,IAAI,8CAAoB,CAAC,aAAa,CAAC,CAAC;AACjD,CAAC;AAFD,wBAEC"}
|
package/cjs/lib/core/errors.d.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module Errors
|
|
3
|
+
* @example
|
|
4
|
+
* import { errors } from "globus/sdk";
|
|
5
|
+
* if (errors.isConsentRequiredError(...)) { ... }
|
|
6
|
+
*/
|
|
1
7
|
export declare class EnvironmentConfigurationError extends Error {
|
|
2
8
|
name: string;
|
|
3
9
|
constructor(variable: string, value: unknown);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../src/lib/core/errors.ts"],"names":[],"mappings":"AAAA,qBAAa,6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,GAAG,IAAI,IAAI,eAAe,CAExE;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,iBAAiB,CAAC;IACxB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,CAAC;AAEF,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,oBAAoB,CAOlF;AAED,MAAM,MAAM,8BAA8B,GAAG;IAC3C,wBAAwB,EAAE;QACxB,eAAe,EAAE,MAAM,CAAC;QACxB,2BAA2B,EAAE,MAAM,EAAE,CAAC;QACtC,oBAAoB,EAAE,OAAO,CAAC;QAC9B,8BAA8B,EAAE,MAAM,EAAE,CAAC;KAC1C,CAAC;IACF,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,CAAC;AAEF,wBAAgB,gCAAgC,CAC9C,IAAI,EAAE,OAAO,GACZ,IAAI,IAAI,8BAA8B,CAOxC"}
|
package/cjs/lib/core/errors.js
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @module Errors
|
|
4
|
+
* @example
|
|
5
|
+
* import { errors } from "globus/sdk";
|
|
6
|
+
* if (errors.isConsentRequiredError(...)) { ... }
|
|
7
|
+
*/
|
|
2
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
9
|
exports.isAuthorizationRequirementsError = exports.isConsentRequiredError = exports.isErrorWellFormed = exports.EnvironmentConfigurationError = void 0;
|
|
4
10
|
class EnvironmentConfigurationError extends Error {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../../src/lib/core/errors.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../../src/lib/core/errors.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,MAAa,6BAA8B,SAAQ,KAAK;IAGtD,YAAY,QAAgB,EAAE,KAAc;QAC1C,KAAK,EAAE,CAAC;QAHD,SAAI,GAAG,+BAA+B,CAAC;QAI9C,4EAA4E;QAC5E,IAAI,CAAC,OAAO,GAAG,4CAA4C,QAAQ,KAAK,KAAK,IAAI,CAAC;IACpF,CAAC;CACF;AARD,sEAQC;AAOD,SAAgB,iBAAiB,CAAC,IAAa;IAC7C,OAAO,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,MAAM,IAAI,IAAI,IAAI,SAAS,IAAI,IAAI,CAAC;AAC1F,CAAC;AAFD,8CAEC;AAQD,SAAgB,sBAAsB,CAAC,IAAa;IAClD,OAAO,CACL,iBAAiB,CAAC,IAAI,CAAC;QACvB,IAAI,CAAC,IAAI,KAAK,iBAAiB;QAC/B,iBAAiB,IAAI,IAAI;QACzB,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,CACpC,CAAC;AACJ,CAAC;AAPD,wDAOC;AAYD,SAAgB,gCAAgC,CAC9C,IAAa;IAEb,OAAO,CACL,iBAAiB,CAAC,IAAI,CAAC;QACvB,0BAA0B,IAAI,IAAI;QAClC,OAAO,IAAI,CAAC,wBAAwB,KAAK,QAAQ;QACjD,IAAI,CAAC,wBAAwB,KAAK,IAAI,CACvC,CAAC;AACJ,CAAC;AATD,4EASC"}
|
package/cjs/lib/core/global.d.ts
CHANGED
|
@@ -51,6 +51,7 @@ export declare function getSDKOptions(options?: SDKOptions): {
|
|
|
51
51
|
};
|
|
52
52
|
};
|
|
53
53
|
environment?: "production" | "preview" | "staging" | "sandbox" | "integration" | "test" | undefined;
|
|
54
|
+
manager?: import("./authorization/AuthorizationManager.js").AuthorizationManager | undefined;
|
|
54
55
|
};
|
|
55
56
|
/**
|
|
56
57
|
* Handlers for: GLOBUS_SDK_VERIFY_SSL
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global.d.ts","sourceRoot":"","sources":["../../../../src/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,YAAY,IAAI,OAAO,CAQtC;AAED;;GAEG;AACH,wBAAgB,cAAc,kBAM7B;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,GAAE,WAA8B,sBAE3F;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,GAAE,WAA8B,sBAG9F"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type Version = string;
|
|
2
|
+
/**
|
|
3
|
+
* The version of the `@globus/sdk` package that is in use.
|
|
4
|
+
*/
|
|
5
|
+
export declare const VERSION: Version;
|
|
6
|
+
export type Info = {
|
|
7
|
+
product: string;
|
|
8
|
+
version: Version;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* The client information identifier for this package.
|
|
12
|
+
*/
|
|
13
|
+
export declare const CLIENT_INFO: Info;
|
|
14
|
+
/**
|
|
15
|
+
* Add a client information identifier to the existing SDK information.
|
|
16
|
+
*/
|
|
17
|
+
export declare function addClientInfo(info: Info): void;
|
|
18
|
+
/**
|
|
19
|
+
* Get the current client information as a string.
|
|
20
|
+
*/
|
|
21
|
+
export declare function getClientInfo(): string;
|
|
22
|
+
export declare function getClientInfoRequestHeaders(): Record<string, string>;
|
|
23
|
+
//# sourceMappingURL=index.d.ts.map
|