@jbrowse/plugin-authentication 4.3.0 → 5.0.0-beta.10
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 +154 -48
- package/esm/DropboxOAuthModel/configSchema.js +32 -2
- package/esm/DropboxOAuthModel/index.js +2 -2
- package/esm/DropboxOAuthModel/model.d.ts +301 -127
- 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 +80 -19
- package/esm/ExternalTokenModel/configSchema.js +22 -1
- package/esm/ExternalTokenModel/index.js +2 -2
- package/esm/ExternalTokenModel/model.d.ts +49 -63
- 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 +152 -47
- package/esm/GoogleDriveOAuthModel/configSchema.js +32 -3
- package/esm/GoogleDriveOAuthModel/index.js +2 -2
- package/esm/GoogleDriveOAuthModel/model.d.ts +296 -128
- 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 +78 -21
- package/esm/HTTPBasicModel/configSchema.js +26 -1
- package/esm/HTTPBasicModel/index.js +2 -2
- package/esm/HTTPBasicModel/model.d.ts +57 -68
- 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 +81 -38
- package/esm/OAuthModel/configSchema.js +30 -1
- package/esm/OAuthModel/index.js +2 -2
- package/esm/OAuthModel/model.d.ts +231 -77
- 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 +0 -1020
- package/esm/index.js +24 -57
- package/esm/lazyLoginForms.d.ts +18 -0
- package/esm/lazyLoginForms.js +25 -0
- package/esm/tokenEntryModelFactory.d.ts +135 -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,93 +1,199 @@
|
|
|
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
19
|
authEndpoint: {
|
|
4
|
-
|
|
5
|
-
|
|
20
|
+
type: "string";
|
|
21
|
+
} & {
|
|
6
22
|
defaultValue: string;
|
|
7
23
|
};
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
24
|
+
authHeader: {
|
|
25
|
+
type: "string";
|
|
26
|
+
} & {
|
|
27
|
+
defaultValue: string;
|
|
28
|
+
};
|
|
29
|
+
clientId: {
|
|
30
|
+
type: "string";
|
|
31
|
+
} & {
|
|
32
|
+
defaultValue: string;
|
|
33
|
+
};
|
|
34
|
+
description: {
|
|
35
|
+
type: "string";
|
|
36
|
+
} & {
|
|
37
|
+
defaultValue: string;
|
|
38
|
+
};
|
|
39
|
+
domains: {
|
|
40
|
+
type: "stringArray";
|
|
41
|
+
} & {
|
|
42
|
+
defaultValue: unknown;
|
|
43
|
+
};
|
|
44
|
+
internetAccountId: {
|
|
45
|
+
type: "string";
|
|
46
|
+
} & {
|
|
47
|
+
defaultValue: string;
|
|
48
|
+
};
|
|
49
|
+
name: {
|
|
50
|
+
type: "string";
|
|
51
|
+
} & {
|
|
11
52
|
defaultValue: string;
|
|
12
53
|
};
|
|
13
54
|
needsPKCE: {
|
|
14
|
-
|
|
15
|
-
|
|
55
|
+
type: "boolean";
|
|
56
|
+
} & {
|
|
16
57
|
defaultValue: boolean;
|
|
17
58
|
};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
defaultValue: string
|
|
59
|
+
responseType: {
|
|
60
|
+
type: "string";
|
|
61
|
+
} & {
|
|
62
|
+
defaultValue: string;
|
|
63
|
+
};
|
|
64
|
+
scopes: {
|
|
65
|
+
type: "string";
|
|
66
|
+
} & {
|
|
67
|
+
defaultValue: string;
|
|
68
|
+
};
|
|
69
|
+
state: {
|
|
70
|
+
type: "string";
|
|
71
|
+
} & {
|
|
72
|
+
defaultValue: string;
|
|
73
|
+
};
|
|
74
|
+
tokenEndpoint: {
|
|
75
|
+
type: "string";
|
|
76
|
+
} & {
|
|
77
|
+
defaultValue: string;
|
|
22
78
|
};
|
|
23
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
24
79
|
tokenType: {
|
|
25
|
-
|
|
26
|
-
|
|
80
|
+
type: "string";
|
|
81
|
+
} & {
|
|
27
82
|
defaultValue: string;
|
|
28
83
|
};
|
|
84
|
+
type: {
|
|
85
|
+
type: "string";
|
|
86
|
+
} & {
|
|
87
|
+
defaultValue: string;
|
|
88
|
+
};
|
|
89
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
29
90
|
authEndpoint: {
|
|
30
|
-
|
|
31
|
-
|
|
91
|
+
type: "string";
|
|
92
|
+
} & {
|
|
32
93
|
defaultValue: string;
|
|
33
94
|
};
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
95
|
+
authHeader: {
|
|
96
|
+
type: "string";
|
|
97
|
+
} & {
|
|
98
|
+
defaultValue: string;
|
|
99
|
+
};
|
|
100
|
+
clientId: {
|
|
101
|
+
type: "string";
|
|
102
|
+
} & {
|
|
103
|
+
defaultValue: string;
|
|
104
|
+
};
|
|
105
|
+
description: {
|
|
106
|
+
type: "string";
|
|
107
|
+
} & {
|
|
108
|
+
defaultValue: string;
|
|
109
|
+
};
|
|
110
|
+
domains: {
|
|
111
|
+
type: "stringArray";
|
|
112
|
+
} & {
|
|
113
|
+
defaultValue: unknown;
|
|
114
|
+
};
|
|
115
|
+
internetAccountId: {
|
|
116
|
+
type: "string";
|
|
117
|
+
} & {
|
|
118
|
+
defaultValue: string;
|
|
119
|
+
};
|
|
120
|
+
name: {
|
|
121
|
+
type: "string";
|
|
122
|
+
} & {
|
|
37
123
|
defaultValue: string;
|
|
38
124
|
};
|
|
39
125
|
needsPKCE: {
|
|
40
|
-
|
|
41
|
-
|
|
126
|
+
type: "boolean";
|
|
127
|
+
} & {
|
|
42
128
|
defaultValue: boolean;
|
|
43
129
|
};
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
130
|
+
responseType: {
|
|
131
|
+
type: "string";
|
|
132
|
+
} & {
|
|
47
133
|
defaultValue: string;
|
|
48
134
|
};
|
|
49
135
|
scopes: {
|
|
50
|
-
|
|
51
|
-
|
|
136
|
+
type: "string";
|
|
137
|
+
} & {
|
|
52
138
|
defaultValue: string;
|
|
53
139
|
};
|
|
54
140
|
state: {
|
|
55
|
-
|
|
56
|
-
|
|
141
|
+
type: "string";
|
|
142
|
+
} & {
|
|
57
143
|
defaultValue: string;
|
|
58
144
|
};
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
145
|
+
tokenEndpoint: {
|
|
146
|
+
type: "string";
|
|
147
|
+
} & {
|
|
148
|
+
defaultValue: string;
|
|
149
|
+
};
|
|
150
|
+
tokenType: {
|
|
151
|
+
type: "string";
|
|
152
|
+
} & {
|
|
153
|
+
defaultValue: string;
|
|
154
|
+
};
|
|
155
|
+
type: {
|
|
156
|
+
type: "string";
|
|
157
|
+
} & {
|
|
62
158
|
defaultValue: string;
|
|
63
159
|
};
|
|
64
160
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
65
|
-
name: {
|
|
66
|
-
|
|
67
|
-
|
|
161
|
+
readonly name: {
|
|
162
|
+
type: "string";
|
|
163
|
+
} & {
|
|
68
164
|
defaultValue: string;
|
|
69
165
|
};
|
|
70
|
-
description: {
|
|
71
|
-
|
|
72
|
-
|
|
166
|
+
readonly description: {
|
|
167
|
+
type: "string";
|
|
168
|
+
} & {
|
|
73
169
|
defaultValue: string;
|
|
74
170
|
};
|
|
75
|
-
authHeader: {
|
|
76
|
-
|
|
77
|
-
|
|
171
|
+
readonly authHeader: {
|
|
172
|
+
type: "string";
|
|
173
|
+
} & {
|
|
78
174
|
defaultValue: string;
|
|
79
175
|
};
|
|
80
|
-
tokenType: {
|
|
81
|
-
|
|
82
|
-
|
|
176
|
+
readonly tokenType: {
|
|
177
|
+
type: "string";
|
|
178
|
+
} & {
|
|
83
179
|
defaultValue: string;
|
|
84
180
|
};
|
|
85
|
-
domains: {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
defaultValue:
|
|
181
|
+
readonly domains: {
|
|
182
|
+
type: "stringArray";
|
|
183
|
+
} & {
|
|
184
|
+
defaultValue: unknown;
|
|
185
|
+
};
|
|
186
|
+
type: {
|
|
187
|
+
type: "string";
|
|
188
|
+
} & {
|
|
189
|
+
defaultValue: string;
|
|
190
|
+
};
|
|
191
|
+
internetAccountId: {
|
|
192
|
+
type: "string";
|
|
193
|
+
} & {
|
|
194
|
+
defaultValue: string;
|
|
89
195
|
};
|
|
90
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "internetAccountId">>, undefined>>, undefined>>;
|
|
196
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "internetAccountId", true, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>, undefined, true, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>, undefined, true, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>;
|
|
91
197
|
export type DropboxOAuthInternetAccountConfigModel = typeof DropboxOAuthConfigSchema;
|
|
92
198
|
export type DropboxOAuthInternetAccountConfig = Instance<DropboxOAuthInternetAccountConfigModel>;
|
|
93
199
|
export default 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';
|