@jbrowse/plugin-authentication 4.2.1 → 5.0.0-beta.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/esm/DropboxOAuthModel/DropboxIcon.d.ts +1 -1
- package/esm/DropboxOAuthModel/configSchema.d.ts +110 -82
- package/esm/DropboxOAuthModel/configSchema.js +32 -2
- package/esm/DropboxOAuthModel/index.js +2 -2
- package/esm/DropboxOAuthModel/model.d.ts +235 -201
- package/esm/DropboxOAuthModel/model.js +46 -21
- package/esm/DropboxOAuthModel/util.d.ts +1 -1
- package/esm/DropboxOAuthModel/util.js +9 -12
- package/esm/ExternalTokenModel/ExternalTokenEntryForm.d.ts +1 -1
- package/esm/ExternalTokenModel/ExternalTokenEntryForm.js +11 -15
- package/esm/ExternalTokenModel/configSchema.d.ts +43 -24
- package/esm/ExternalTokenModel/configSchema.js +22 -1
- package/esm/ExternalTokenModel/index.js +2 -2
- package/esm/ExternalTokenModel/model.d.ts +47 -71
- package/esm/ExternalTokenModel/model.js +11 -54
- package/esm/GoogleDriveOAuthModel/GoogleDriveFilehandle.d.ts +2 -9
- package/esm/GoogleDriveOAuthModel/GoogleDriveFilehandle.js +27 -6
- package/esm/GoogleDriveOAuthModel/GoogleDriveIcon.d.ts +1 -1
- package/esm/GoogleDriveOAuthModel/configSchema.d.ts +109 -82
- package/esm/GoogleDriveOAuthModel/configSchema.js +32 -3
- package/esm/GoogleDriveOAuthModel/index.js +2 -2
- package/esm/GoogleDriveOAuthModel/model.d.ts +230 -202
- package/esm/GoogleDriveOAuthModel/model.js +45 -22
- package/esm/GoogleDriveOAuthModel/util.d.ts +1 -1
- package/esm/GoogleDriveOAuthModel/util.js +2 -11
- package/esm/HTTPBasicModel/HTTPBasicLoginForm.d.ts +1 -1
- package/esm/HTTPBasicModel/HTTPBasicLoginForm.js +17 -22
- package/esm/HTTPBasicModel/configSchema.d.ts +51 -28
- package/esm/HTTPBasicModel/configSchema.js +26 -1
- package/esm/HTTPBasicModel/index.js +2 -2
- package/esm/HTTPBasicModel/model.d.ts +55 -76
- package/esm/HTTPBasicModel/model.js +21 -51
- package/esm/OAuthModel/OAuthLoginPrompt.d.ts +4 -0
- package/esm/OAuthModel/OAuthLoginPrompt.js +12 -0
- package/esm/OAuthModel/configSchema.d.ts +79 -52
- package/esm/OAuthModel/configSchema.js +30 -1
- package/esm/OAuthModel/index.js +2 -2
- package/esm/OAuthModel/model.d.ts +218 -114
- package/esm/OAuthModel/model.js +361 -217
- package/esm/OAuthModel/util.d.ts +46 -7
- package/esm/OAuthModel/util.js +159 -16
- package/esm/index.d.ts +295 -981
- package/esm/index.js +29 -45
- package/esm/lazyLoginForms.d.ts +18 -0
- package/esm/lazyLoginForms.js +25 -0
- package/esm/tokenEntryModelFactory.d.ts +125 -0
- package/esm/tokenEntryModelFactory.js +85 -0
- package/esm/util.d.ts +10 -0
- package/esm/util.js +24 -2
- package/package.json +10 -13
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { SvgIconProps } from '@mui/material';
|
|
2
|
-
export default function DropboxIcon(props: SvgIconProps): import("react
|
|
2
|
+
export default function DropboxIcon(props: SvgIconProps): import("react").JSX.Element;
|
|
@@ -1,91 +1,119 @@
|
|
|
1
1
|
import type { Instance } from '@jbrowse/mobx-state-tree';
|
|
2
|
+
/**
|
|
3
|
+
* #config DropboxOAuthInternetAccount
|
|
4
|
+
*
|
|
5
|
+
* #example
|
|
6
|
+
* The Dropbox endpoints are pre-filled, so an entry needs only your own OAuth
|
|
7
|
+
* app's `clientId`. Leave `domains` off and the account is still selectable by
|
|
8
|
+
* hand in the Add Track form.
|
|
9
|
+
* ```js
|
|
10
|
+
* {
|
|
11
|
+
* type: 'DropboxOAuthInternetAccount',
|
|
12
|
+
* internetAccountId: 'dropboxOAuth',
|
|
13
|
+
* name: 'Dropbox',
|
|
14
|
+
* clientId: 'your-dropbox-app-key',
|
|
15
|
+
* }
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
2
18
|
declare const DropboxOAuthConfigSchema: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
/**
|
|
20
|
+
* #slot
|
|
21
|
+
*/
|
|
22
|
+
readonly authEndpoint: {
|
|
23
|
+
readonly description: "the authorization code endpoint of the internet account";
|
|
24
|
+
readonly type: "string";
|
|
25
|
+
readonly defaultValue: "https://www.dropbox.com/oauth2/authorize";
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* #slot
|
|
29
|
+
*/
|
|
30
|
+
readonly tokenEndpoint: {
|
|
31
|
+
readonly description: "the token endpoint of the internet account";
|
|
32
|
+
readonly type: "string";
|
|
33
|
+
readonly defaultValue: "https://api.dropbox.com/oauth2/token";
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* #slot
|
|
37
|
+
*/
|
|
38
|
+
readonly needsPKCE: {
|
|
39
|
+
readonly description: "boolean to indicate if the endpoint needs a PKCE code";
|
|
40
|
+
readonly type: "boolean";
|
|
41
|
+
readonly defaultValue: true;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* #slot
|
|
45
|
+
*/
|
|
46
|
+
readonly domains: {
|
|
47
|
+
readonly description: "array of valid domains the url can contain to use this account";
|
|
48
|
+
readonly type: "stringArray";
|
|
49
|
+
readonly defaultValue: readonly ["addtodropbox.com", "db.tt", "dropbox.com", "dropboxapi.com", "dropboxbusiness.com", "dropbox.tech", "getdropbox.com"];
|
|
22
50
|
};
|
|
23
51
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
24
|
-
tokenType: {
|
|
25
|
-
description:
|
|
26
|
-
type: string;
|
|
27
|
-
defaultValue:
|
|
28
|
-
};
|
|
29
|
-
authEndpoint: {
|
|
30
|
-
description:
|
|
31
|
-
type: string;
|
|
32
|
-
defaultValue:
|
|
33
|
-
};
|
|
34
|
-
tokenEndpoint: {
|
|
35
|
-
description:
|
|
36
|
-
type: string;
|
|
37
|
-
defaultValue:
|
|
38
|
-
};
|
|
39
|
-
needsPKCE: {
|
|
40
|
-
description:
|
|
41
|
-
type:
|
|
42
|
-
defaultValue:
|
|
43
|
-
};
|
|
44
|
-
clientId: {
|
|
45
|
-
description:
|
|
46
|
-
type: string;
|
|
47
|
-
defaultValue:
|
|
48
|
-
};
|
|
49
|
-
scopes: {
|
|
50
|
-
description:
|
|
51
|
-
type: string;
|
|
52
|
-
defaultValue:
|
|
53
|
-
};
|
|
54
|
-
state: {
|
|
55
|
-
description:
|
|
56
|
-
type: string;
|
|
57
|
-
defaultValue:
|
|
58
|
-
};
|
|
59
|
-
responseType: {
|
|
60
|
-
description:
|
|
61
|
-
type: string;
|
|
62
|
-
defaultValue:
|
|
52
|
+
readonly tokenType: {
|
|
53
|
+
readonly description: "a custom name for a token to include in the header";
|
|
54
|
+
readonly type: "string";
|
|
55
|
+
readonly defaultValue: "Bearer";
|
|
56
|
+
};
|
|
57
|
+
readonly authEndpoint: {
|
|
58
|
+
readonly description: "the authorization code endpoint of the internet account";
|
|
59
|
+
readonly type: "string";
|
|
60
|
+
readonly defaultValue: "";
|
|
61
|
+
};
|
|
62
|
+
readonly tokenEndpoint: {
|
|
63
|
+
readonly description: "the token endpoint of the internet account";
|
|
64
|
+
readonly type: "string";
|
|
65
|
+
readonly defaultValue: "";
|
|
66
|
+
};
|
|
67
|
+
readonly needsPKCE: {
|
|
68
|
+
readonly description: "boolean to indicate if the endpoint needs a PKCE code";
|
|
69
|
+
readonly type: "boolean";
|
|
70
|
+
readonly defaultValue: false;
|
|
71
|
+
};
|
|
72
|
+
readonly clientId: {
|
|
73
|
+
readonly description: "id for the OAuth application";
|
|
74
|
+
readonly type: "string";
|
|
75
|
+
readonly defaultValue: "";
|
|
76
|
+
};
|
|
77
|
+
readonly scopes: {
|
|
78
|
+
readonly description: "optional scopes for the authorization call";
|
|
79
|
+
readonly type: "string";
|
|
80
|
+
readonly defaultValue: "";
|
|
81
|
+
};
|
|
82
|
+
readonly state: {
|
|
83
|
+
readonly description: "optional state for the authorization call";
|
|
84
|
+
readonly type: "string";
|
|
85
|
+
readonly defaultValue: "";
|
|
86
|
+
};
|
|
87
|
+
readonly responseType: {
|
|
88
|
+
readonly description: "the type of response from the authorization endpoint. can be 'token' or 'code'";
|
|
89
|
+
readonly type: "string";
|
|
90
|
+
readonly defaultValue: "code";
|
|
63
91
|
};
|
|
64
92
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
65
|
-
name: {
|
|
66
|
-
description:
|
|
67
|
-
type: string;
|
|
68
|
-
defaultValue:
|
|
69
|
-
};
|
|
70
|
-
description: {
|
|
71
|
-
description:
|
|
72
|
-
type: string;
|
|
73
|
-
defaultValue:
|
|
74
|
-
};
|
|
75
|
-
authHeader: {
|
|
76
|
-
description:
|
|
77
|
-
type: string;
|
|
78
|
-
defaultValue:
|
|
79
|
-
};
|
|
80
|
-
tokenType: {
|
|
81
|
-
description:
|
|
82
|
-
type: string;
|
|
83
|
-
defaultValue:
|
|
84
|
-
};
|
|
85
|
-
domains: {
|
|
86
|
-
description:
|
|
87
|
-
type:
|
|
88
|
-
defaultValue:
|
|
93
|
+
readonly name: {
|
|
94
|
+
readonly description: "descriptive name of the internet account";
|
|
95
|
+
readonly type: "string";
|
|
96
|
+
readonly defaultValue: "";
|
|
97
|
+
};
|
|
98
|
+
readonly description: {
|
|
99
|
+
readonly description: "a description of the internet account";
|
|
100
|
+
readonly type: "string";
|
|
101
|
+
readonly defaultValue: "";
|
|
102
|
+
};
|
|
103
|
+
readonly authHeader: {
|
|
104
|
+
readonly description: "request header for credentials";
|
|
105
|
+
readonly type: "string";
|
|
106
|
+
readonly defaultValue: "Authorization";
|
|
107
|
+
};
|
|
108
|
+
readonly tokenType: {
|
|
109
|
+
readonly description: "a custom name for a token to include in the header";
|
|
110
|
+
readonly type: "string";
|
|
111
|
+
readonly defaultValue: "";
|
|
112
|
+
};
|
|
113
|
+
readonly domains: {
|
|
114
|
+
readonly description: "array of valid domains the url can contain to use this account";
|
|
115
|
+
readonly type: "stringArray";
|
|
116
|
+
readonly defaultValue: readonly [];
|
|
89
117
|
};
|
|
90
118
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "internetAccountId">>, undefined>>, undefined>>;
|
|
91
119
|
export type DropboxOAuthInternetAccountConfigModel = typeof DropboxOAuthConfigSchema;
|
|
@@ -1,22 +1,49 @@
|
|
|
1
1
|
import { ConfigurationSchema } from '@jbrowse/core/configuration';
|
|
2
|
-
import OAuthConfigSchema from
|
|
3
|
-
|
|
2
|
+
import OAuthConfigSchema from '../OAuthModel/configSchema.js';
|
|
3
|
+
/**
|
|
4
|
+
* #config DropboxOAuthInternetAccount
|
|
5
|
+
*
|
|
6
|
+
* #example
|
|
7
|
+
* The Dropbox endpoints are pre-filled, so an entry needs only your own OAuth
|
|
8
|
+
* app's `clientId`. Leave `domains` off and the account is still selectable by
|
|
9
|
+
* hand in the Add Track form.
|
|
10
|
+
* ```js
|
|
11
|
+
* {
|
|
12
|
+
* type: 'DropboxOAuthInternetAccount',
|
|
13
|
+
* internetAccountId: 'dropboxOAuth',
|
|
14
|
+
* name: 'Dropbox',
|
|
15
|
+
* clientId: 'your-dropbox-app-key',
|
|
16
|
+
* }
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
4
19
|
const DropboxOAuthConfigSchema = ConfigurationSchema('DropboxOAuthInternetAccount', {
|
|
20
|
+
/**
|
|
21
|
+
* #slot
|
|
22
|
+
*/
|
|
5
23
|
authEndpoint: {
|
|
6
24
|
description: 'the authorization code endpoint of the internet account',
|
|
7
25
|
type: 'string',
|
|
8
26
|
defaultValue: 'https://www.dropbox.com/oauth2/authorize',
|
|
9
27
|
},
|
|
28
|
+
/**
|
|
29
|
+
* #slot
|
|
30
|
+
*/
|
|
10
31
|
tokenEndpoint: {
|
|
11
32
|
description: 'the token endpoint of the internet account',
|
|
12
33
|
type: 'string',
|
|
13
34
|
defaultValue: 'https://api.dropbox.com/oauth2/token',
|
|
14
35
|
},
|
|
36
|
+
/**
|
|
37
|
+
* #slot
|
|
38
|
+
*/
|
|
15
39
|
needsPKCE: {
|
|
16
40
|
description: 'boolean to indicate if the endpoint needs a PKCE code',
|
|
17
41
|
type: 'boolean',
|
|
18
42
|
defaultValue: true,
|
|
19
43
|
},
|
|
44
|
+
/**
|
|
45
|
+
* #slot
|
|
46
|
+
*/
|
|
20
47
|
domains: {
|
|
21
48
|
description: 'array of valid domains the url can contain to use this account',
|
|
22
49
|
type: 'stringArray',
|
|
@@ -31,6 +58,9 @@ const DropboxOAuthConfigSchema = ConfigurationSchema('DropboxOAuthInternetAccoun
|
|
|
31
58
|
],
|
|
32
59
|
},
|
|
33
60
|
}, {
|
|
61
|
+
/**
|
|
62
|
+
* #baseConfiguration
|
|
63
|
+
*/
|
|
34
64
|
baseConfiguration: OAuthConfigSchema,
|
|
35
65
|
explicitlyTyped: true,
|
|
36
66
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as configSchema } from
|
|
2
|
-
export { default as modelFactory } from
|
|
1
|
+
export { default as configSchema } from './configSchema.js';
|
|
2
|
+
export { default as modelFactory } from './model.js';
|