@jbrowse/plugin-authentication 5.0.0-beta.1 → 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.
@@ -13,101 +13,151 @@ export default function stateModelFactory(configSchema: GoogleDriveOAuthInternet
13
13
  type: import("@jbrowse/mobx-state-tree").ISimpleType<string>;
14
14
  configuration: import("@jbrowse/core/configuration/configurationSchema").IConfigurationReference<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
15
15
  readonly name: {
16
- readonly description: "descriptive name of the internet account";
17
- readonly type: "string";
18
- readonly defaultValue: "";
16
+ type: "string";
17
+ } & {
18
+ defaultValue: string;
19
19
  };
20
20
  readonly description: {
21
- readonly description: "a description of the internet account";
22
- readonly type: "string";
23
- readonly defaultValue: "";
21
+ type: "string";
22
+ } & {
23
+ defaultValue: string;
24
24
  };
25
25
  readonly authHeader: {
26
- readonly description: "request header for credentials";
27
- readonly type: "string";
28
- readonly defaultValue: "Authorization";
26
+ type: "string";
27
+ } & {
28
+ defaultValue: string;
29
29
  };
30
30
  readonly tokenType: {
31
- readonly description: "a custom name for a token to include in the header";
32
- readonly type: "string";
33
- readonly defaultValue: "";
31
+ type: "string";
32
+ } & {
33
+ defaultValue: string;
34
34
  };
35
35
  readonly domains: {
36
- readonly description: "array of valid domains the url can contain to use this account";
37
- readonly type: "stringArray";
38
- readonly defaultValue: readonly [];
36
+ type: "stringArray";
37
+ } & {
38
+ defaultValue: unknown;
39
39
  };
40
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "internetAccountId">>>;
40
+ type: {
41
+ type: "string";
42
+ } & {
43
+ defaultValue: string;
44
+ };
45
+ internetAccountId: {
46
+ type: "string";
47
+ } & {
48
+ defaultValue: string;
49
+ };
50
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "internetAccountId", true, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>, any>>>;
41
51
  }, "configuration" | "type"> & {
42
52
  type: import("@jbrowse/mobx-state-tree").ILiteralType<"OAuthInternetAccount">;
43
53
  configuration: import("@jbrowse/core/configuration/configurationSchema").IConfigurationReference<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
44
- readonly tokenType: {
45
- readonly description: "a custom name for a token to include in the header";
46
- readonly type: "string";
47
- readonly defaultValue: "Bearer";
48
- };
49
- readonly authEndpoint: {
50
- readonly description: "the authorization code endpoint of the internet account";
51
- readonly type: "string";
52
- readonly defaultValue: "";
53
- };
54
- readonly tokenEndpoint: {
55
- readonly description: "the token endpoint of the internet account";
56
- readonly type: "string";
57
- readonly defaultValue: "";
58
- };
59
- readonly needsPKCE: {
60
- readonly description: "boolean to indicate if the endpoint needs a PKCE code";
61
- readonly type: "boolean";
62
- readonly defaultValue: false;
63
- };
64
- readonly clientId: {
65
- readonly description: "id for the OAuth application";
66
- readonly type: "string";
67
- readonly defaultValue: "";
68
- };
69
- readonly scopes: {
70
- readonly description: "optional scopes for the authorization call";
71
- readonly type: "string";
72
- readonly defaultValue: "";
73
- };
74
- readonly state: {
75
- readonly description: "optional state for the authorization call";
76
- readonly type: "string";
77
- readonly defaultValue: "";
78
- };
79
- readonly responseType: {
80
- readonly description: "the type of response from the authorization endpoint. can be 'token' or 'code'";
81
- readonly type: "string";
82
- readonly defaultValue: "code";
54
+ authEndpoint: {
55
+ type: "string";
56
+ } & {
57
+ defaultValue: string;
58
+ };
59
+ authHeader: {
60
+ type: "string";
61
+ } & {
62
+ defaultValue: string;
63
+ };
64
+ clientId: {
65
+ type: "string";
66
+ } & {
67
+ defaultValue: string;
68
+ };
69
+ description: {
70
+ type: "string";
71
+ } & {
72
+ defaultValue: string;
73
+ };
74
+ domains: {
75
+ type: "stringArray";
76
+ } & {
77
+ defaultValue: unknown;
78
+ };
79
+ internetAccountId: {
80
+ type: "string";
81
+ } & {
82
+ defaultValue: string;
83
+ };
84
+ name: {
85
+ type: "string";
86
+ } & {
87
+ defaultValue: string;
88
+ };
89
+ needsPKCE: {
90
+ type: "boolean";
91
+ } & {
92
+ defaultValue: boolean;
93
+ };
94
+ responseType: {
95
+ type: "string";
96
+ } & {
97
+ defaultValue: string;
98
+ };
99
+ scopes: {
100
+ type: "string";
101
+ } & {
102
+ defaultValue: string;
103
+ };
104
+ state: {
105
+ type: "string";
106
+ } & {
107
+ defaultValue: string;
108
+ };
109
+ tokenEndpoint: {
110
+ type: "string";
111
+ } & {
112
+ defaultValue: string;
113
+ };
114
+ tokenType: {
115
+ type: "string";
116
+ } & {
117
+ defaultValue: string;
118
+ };
119
+ type: {
120
+ type: "string";
121
+ } & {
122
+ defaultValue: string;
83
123
  };
84
124
  }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
85
125
  readonly name: {
86
- readonly description: "descriptive name of the internet account";
87
- readonly type: "string";
88
- readonly defaultValue: "";
126
+ type: "string";
127
+ } & {
128
+ defaultValue: string;
89
129
  };
90
130
  readonly description: {
91
- readonly description: "a description of the internet account";
92
- readonly type: "string";
93
- readonly defaultValue: "";
131
+ type: "string";
132
+ } & {
133
+ defaultValue: string;
94
134
  };
95
135
  readonly authHeader: {
96
- readonly description: "request header for credentials";
97
- readonly type: "string";
98
- readonly defaultValue: "Authorization";
136
+ type: "string";
137
+ } & {
138
+ defaultValue: string;
99
139
  };
100
140
  readonly tokenType: {
101
- readonly description: "a custom name for a token to include in the header";
102
- readonly type: "string";
103
- readonly defaultValue: "";
141
+ type: "string";
142
+ } & {
143
+ defaultValue: string;
104
144
  };
105
145
  readonly domains: {
106
- readonly description: "array of valid domains the url can contain to use this account";
107
- readonly type: "stringArray";
108
- readonly defaultValue: readonly [];
146
+ type: "stringArray";
147
+ } & {
148
+ defaultValue: unknown;
109
149
  };
110
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "internetAccountId">>, undefined>>>;
150
+ type: {
151
+ type: "string";
152
+ } & {
153
+ defaultValue: string;
154
+ };
155
+ internetAccountId: {
156
+ type: "string";
157
+ } & {
158
+ defaultValue: string;
159
+ };
160
+ }, 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>>>;
111
161
  }, "configuration" | "type"> & {
112
162
  /**
113
163
  * #property
@@ -117,94 +167,184 @@ export default function stateModelFactory(configSchema: GoogleDriveOAuthInternet
117
167
  * #property
118
168
  */
119
169
  configuration: import("@jbrowse/core/configuration/configurationSchema").IConfigurationReference<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
120
- readonly authEndpoint: {
121
- readonly description: "the authorization code endpoint of the internet account";
122
- readonly type: "string";
123
- readonly defaultValue: "https://accounts.google.com/o/oauth2/v2/auth";
124
- };
125
- readonly scopes: {
126
- readonly description: "optional scopes for the authorization call";
127
- readonly type: "string";
128
- readonly defaultValue: "https://www.googleapis.com/auth/drive.readonly";
129
- };
130
- readonly domains: {
131
- readonly description: "array of valid domains the url can contain to use this account";
132
- readonly type: "stringArray";
133
- readonly defaultValue: readonly ["drive.google.com"];
134
- };
135
- readonly responseType: {
136
- readonly description: "the type of response from the authorization endpoint";
137
- readonly type: "string";
138
- readonly defaultValue: "token";
170
+ authEndpoint: {
171
+ type: "string";
172
+ } & {
173
+ defaultValue: string;
174
+ };
175
+ authHeader: {
176
+ type: "string";
177
+ } & {
178
+ defaultValue: string;
179
+ };
180
+ clientId: {
181
+ type: "string";
182
+ } & {
183
+ defaultValue: string;
184
+ };
185
+ description: {
186
+ type: "string";
187
+ } & {
188
+ defaultValue: string;
189
+ };
190
+ domains: {
191
+ type: "stringArray";
192
+ } & {
193
+ defaultValue: unknown;
194
+ };
195
+ internetAccountId: {
196
+ type: "string";
197
+ } & {
198
+ defaultValue: string;
199
+ };
200
+ name: {
201
+ type: "string";
202
+ } & {
203
+ defaultValue: string;
204
+ };
205
+ needsPKCE: {
206
+ type: "boolean";
207
+ } & {
208
+ defaultValue: boolean;
209
+ };
210
+ responseType: {
211
+ type: "string";
212
+ } & {
213
+ defaultValue: string;
214
+ };
215
+ scopes: {
216
+ type: "string";
217
+ } & {
218
+ defaultValue: string;
219
+ };
220
+ state: {
221
+ type: "string";
222
+ } & {
223
+ defaultValue: string;
224
+ };
225
+ tokenEndpoint: {
226
+ type: "string";
227
+ } & {
228
+ defaultValue: string;
229
+ };
230
+ tokenType: {
231
+ type: "string";
232
+ } & {
233
+ defaultValue: string;
234
+ };
235
+ type: {
236
+ type: "string";
237
+ } & {
238
+ defaultValue: string;
139
239
  };
140
240
  }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
141
- readonly tokenType: {
142
- readonly description: "a custom name for a token to include in the header";
143
- readonly type: "string";
144
- readonly defaultValue: "Bearer";
145
- };
146
- readonly authEndpoint: {
147
- readonly description: "the authorization code endpoint of the internet account";
148
- readonly type: "string";
149
- readonly defaultValue: "";
150
- };
151
- readonly tokenEndpoint: {
152
- readonly description: "the token endpoint of the internet account";
153
- readonly type: "string";
154
- readonly defaultValue: "";
155
- };
156
- readonly needsPKCE: {
157
- readonly description: "boolean to indicate if the endpoint needs a PKCE code";
158
- readonly type: "boolean";
159
- readonly defaultValue: false;
160
- };
161
- readonly clientId: {
162
- readonly description: "id for the OAuth application";
163
- readonly type: "string";
164
- readonly defaultValue: "";
165
- };
166
- readonly scopes: {
167
- readonly description: "optional scopes for the authorization call";
168
- readonly type: "string";
169
- readonly defaultValue: "";
170
- };
171
- readonly state: {
172
- readonly description: "optional state for the authorization call";
173
- readonly type: "string";
174
- readonly defaultValue: "";
175
- };
176
- readonly responseType: {
177
- readonly description: "the type of response from the authorization endpoint. can be 'token' or 'code'";
178
- readonly type: "string";
179
- readonly defaultValue: "code";
241
+ authEndpoint: {
242
+ type: "string";
243
+ } & {
244
+ defaultValue: string;
245
+ };
246
+ authHeader: {
247
+ type: "string";
248
+ } & {
249
+ defaultValue: string;
250
+ };
251
+ clientId: {
252
+ type: "string";
253
+ } & {
254
+ defaultValue: string;
255
+ };
256
+ description: {
257
+ type: "string";
258
+ } & {
259
+ defaultValue: string;
260
+ };
261
+ domains: {
262
+ type: "stringArray";
263
+ } & {
264
+ defaultValue: unknown;
265
+ };
266
+ internetAccountId: {
267
+ type: "string";
268
+ } & {
269
+ defaultValue: string;
270
+ };
271
+ name: {
272
+ type: "string";
273
+ } & {
274
+ defaultValue: string;
275
+ };
276
+ needsPKCE: {
277
+ type: "boolean";
278
+ } & {
279
+ defaultValue: boolean;
280
+ };
281
+ responseType: {
282
+ type: "string";
283
+ } & {
284
+ defaultValue: string;
285
+ };
286
+ scopes: {
287
+ type: "string";
288
+ } & {
289
+ defaultValue: string;
290
+ };
291
+ state: {
292
+ type: "string";
293
+ } & {
294
+ defaultValue: string;
295
+ };
296
+ tokenEndpoint: {
297
+ type: "string";
298
+ } & {
299
+ defaultValue: string;
300
+ };
301
+ tokenType: {
302
+ type: "string";
303
+ } & {
304
+ defaultValue: string;
305
+ };
306
+ type: {
307
+ type: "string";
308
+ } & {
309
+ defaultValue: string;
180
310
  };
181
311
  }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
182
312
  readonly name: {
183
- readonly description: "descriptive name of the internet account";
184
- readonly type: "string";
185
- readonly defaultValue: "";
313
+ type: "string";
314
+ } & {
315
+ defaultValue: string;
186
316
  };
187
317
  readonly description: {
188
- readonly description: "a description of the internet account";
189
- readonly type: "string";
190
- readonly defaultValue: "";
318
+ type: "string";
319
+ } & {
320
+ defaultValue: string;
191
321
  };
192
322
  readonly authHeader: {
193
- readonly description: "request header for credentials";
194
- readonly type: "string";
195
- readonly defaultValue: "Authorization";
323
+ type: "string";
324
+ } & {
325
+ defaultValue: string;
196
326
  };
197
327
  readonly tokenType: {
198
- readonly description: "a custom name for a token to include in the header";
199
- readonly type: "string";
200
- readonly defaultValue: "";
328
+ type: "string";
329
+ } & {
330
+ defaultValue: string;
201
331
  };
202
332
  readonly domains: {
203
- readonly description: "array of valid domains the url can contain to use this account";
204
- readonly type: "stringArray";
205
- readonly defaultValue: readonly [];
333
+ type: "stringArray";
334
+ } & {
335
+ defaultValue: unknown;
336
+ };
337
+ type: {
338
+ type: "string";
339
+ } & {
340
+ defaultValue: string;
341
+ };
342
+ internetAccountId: {
343
+ type: "string";
344
+ } & {
345
+ defaultValue: string;
206
346
  };
207
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "internetAccountId">>, undefined>>, undefined>>>;
347
+ }, 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>>>;
208
348
  }, {
209
349
  readonly name: string;
210
350
  readonly description: string;
@@ -264,7 +404,7 @@ export default function stateModelFactory(configSchema: GoogleDriveOAuthInternet
264
404
  readonly clientId: string;
265
405
  readonly scopes: string;
266
406
  readonly state: string;
267
- readonly responseType: 'token' | 'code';
407
+ readonly responseType: string;
268
408
  readonly refreshTokenKey: string;
269
409
  readonly authFlowParams: Record<string, string>;
270
410
  } & {
@@ -17,49 +17,83 @@ import type { Instance } from '@jbrowse/mobx-state-tree';
17
17
  * ```
18
18
  */
19
19
  declare const HTTPBasicConfigSchema: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
20
- /**
21
- * #slot
22
- */
23
- readonly tokenType: {
24
- readonly description: "a custom name for a token to include in the header";
25
- readonly type: "string";
26
- readonly defaultValue: "Basic";
20
+ authHeader: {
21
+ type: "string";
22
+ } & {
23
+ defaultValue: string;
24
+ };
25
+ description: {
26
+ type: "string";
27
+ } & {
28
+ defaultValue: string;
29
+ };
30
+ domains: {
31
+ type: "stringArray";
32
+ } & {
33
+ defaultValue: unknown;
34
+ };
35
+ internetAccountId: {
36
+ type: "string";
37
+ } & {
38
+ defaultValue: string;
39
+ };
40
+ name: {
41
+ type: "string";
42
+ } & {
43
+ defaultValue: string;
27
44
  };
28
- /**
29
- * #slot
30
- */
31
- readonly validateWithHEAD: {
32
- readonly description: "validate the token with a HEAD request before using it";
33
- readonly type: "boolean";
34
- readonly defaultValue: true;
45
+ tokenType: {
46
+ type: "string";
47
+ } & {
48
+ defaultValue: string;
49
+ };
50
+ type: {
51
+ type: "string";
52
+ } & {
53
+ defaultValue: string;
54
+ };
55
+ validateWithHEAD: {
56
+ type: "boolean";
57
+ } & {
58
+ defaultValue: boolean;
35
59
  };
36
60
  }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
37
61
  readonly name: {
38
- readonly description: "descriptive name of the internet account";
39
- readonly type: "string";
40
- readonly defaultValue: "";
62
+ type: "string";
63
+ } & {
64
+ defaultValue: string;
41
65
  };
42
66
  readonly description: {
43
- readonly description: "a description of the internet account";
44
- readonly type: "string";
45
- readonly defaultValue: "";
67
+ type: "string";
68
+ } & {
69
+ defaultValue: string;
46
70
  };
47
71
  readonly authHeader: {
48
- readonly description: "request header for credentials";
49
- readonly type: "string";
50
- readonly defaultValue: "Authorization";
72
+ type: "string";
73
+ } & {
74
+ defaultValue: string;
51
75
  };
52
76
  readonly tokenType: {
53
- readonly description: "a custom name for a token to include in the header";
54
- readonly type: "string";
55
- readonly defaultValue: "";
77
+ type: "string";
78
+ } & {
79
+ defaultValue: string;
56
80
  };
57
81
  readonly domains: {
58
- readonly description: "array of valid domains the url can contain to use this account";
59
- readonly type: "stringArray";
60
- readonly defaultValue: readonly [];
82
+ type: "stringArray";
83
+ } & {
84
+ defaultValue: unknown;
85
+ };
86
+ type: {
87
+ type: "string";
88
+ } & {
89
+ defaultValue: string;
90
+ };
91
+ internetAccountId: {
92
+ type: "string";
93
+ } & {
94
+ defaultValue: string;
61
95
  };
62
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "internetAccountId">>, undefined>>;
96
+ }, 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>>;
63
97
  export type HTTPBasicInternetAccountConfigModel = typeof HTTPBasicConfigSchema;
64
98
  export type HTTPBasicInternetAccountConfig = Instance<HTTPBasicInternetAccountConfigModel>;
65
99
  export default HTTPBasicConfigSchema;