@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,93 +1,198 @@
|
|
|
1
1
|
import type { Instance } from '@jbrowse/mobx-state-tree';
|
|
2
|
+
/**
|
|
3
|
+
* #config GoogleDriveOAuthInternetAccount
|
|
4
|
+
*
|
|
5
|
+
* #example
|
|
6
|
+
* The Google endpoints and scopes are pre-filled, so an entry needs only your
|
|
7
|
+
* own OAuth app's `clientId`.
|
|
8
|
+
* ```js
|
|
9
|
+
* {
|
|
10
|
+
* type: 'GoogleDriveOAuthInternetAccount',
|
|
11
|
+
* internetAccountId: 'googleDriveOAuth',
|
|
12
|
+
* name: 'Google Drive',
|
|
13
|
+
* clientId: 'your-client-id.apps.googleusercontent.com',
|
|
14
|
+
* }
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
2
17
|
declare const GoogleDriveOAuthConfigSchema: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
3
18
|
authEndpoint: {
|
|
4
|
-
|
|
5
|
-
|
|
19
|
+
type: "string";
|
|
20
|
+
} & {
|
|
6
21
|
defaultValue: string;
|
|
7
22
|
};
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
23
|
+
authHeader: {
|
|
24
|
+
type: "string";
|
|
25
|
+
} & {
|
|
26
|
+
defaultValue: string;
|
|
27
|
+
};
|
|
28
|
+
clientId: {
|
|
29
|
+
type: "string";
|
|
30
|
+
} & {
|
|
31
|
+
defaultValue: string;
|
|
32
|
+
};
|
|
33
|
+
description: {
|
|
34
|
+
type: "string";
|
|
35
|
+
} & {
|
|
11
36
|
defaultValue: string;
|
|
12
37
|
};
|
|
13
38
|
domains: {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
defaultValue:
|
|
39
|
+
type: "stringArray";
|
|
40
|
+
} & {
|
|
41
|
+
defaultValue: unknown;
|
|
42
|
+
};
|
|
43
|
+
internetAccountId: {
|
|
44
|
+
type: "string";
|
|
45
|
+
} & {
|
|
46
|
+
defaultValue: string;
|
|
47
|
+
};
|
|
48
|
+
name: {
|
|
49
|
+
type: "string";
|
|
50
|
+
} & {
|
|
51
|
+
defaultValue: string;
|
|
52
|
+
};
|
|
53
|
+
needsPKCE: {
|
|
54
|
+
type: "boolean";
|
|
55
|
+
} & {
|
|
56
|
+
defaultValue: boolean;
|
|
17
57
|
};
|
|
18
58
|
responseType: {
|
|
19
|
-
|
|
20
|
-
|
|
59
|
+
type: "string";
|
|
60
|
+
} & {
|
|
61
|
+
defaultValue: string;
|
|
62
|
+
};
|
|
63
|
+
scopes: {
|
|
64
|
+
type: "string";
|
|
65
|
+
} & {
|
|
66
|
+
defaultValue: string;
|
|
67
|
+
};
|
|
68
|
+
state: {
|
|
69
|
+
type: "string";
|
|
70
|
+
} & {
|
|
71
|
+
defaultValue: string;
|
|
72
|
+
};
|
|
73
|
+
tokenEndpoint: {
|
|
74
|
+
type: "string";
|
|
75
|
+
} & {
|
|
21
76
|
defaultValue: string;
|
|
22
77
|
};
|
|
23
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
24
78
|
tokenType: {
|
|
25
|
-
|
|
26
|
-
|
|
79
|
+
type: "string";
|
|
80
|
+
} & {
|
|
81
|
+
defaultValue: string;
|
|
82
|
+
};
|
|
83
|
+
type: {
|
|
84
|
+
type: "string";
|
|
85
|
+
} & {
|
|
27
86
|
defaultValue: string;
|
|
28
87
|
};
|
|
88
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
29
89
|
authEndpoint: {
|
|
30
|
-
|
|
31
|
-
|
|
90
|
+
type: "string";
|
|
91
|
+
} & {
|
|
32
92
|
defaultValue: string;
|
|
33
93
|
};
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
94
|
+
authHeader: {
|
|
95
|
+
type: "string";
|
|
96
|
+
} & {
|
|
97
|
+
defaultValue: string;
|
|
98
|
+
};
|
|
99
|
+
clientId: {
|
|
100
|
+
type: "string";
|
|
101
|
+
} & {
|
|
102
|
+
defaultValue: string;
|
|
103
|
+
};
|
|
104
|
+
description: {
|
|
105
|
+
type: "string";
|
|
106
|
+
} & {
|
|
107
|
+
defaultValue: string;
|
|
108
|
+
};
|
|
109
|
+
domains: {
|
|
110
|
+
type: "stringArray";
|
|
111
|
+
} & {
|
|
112
|
+
defaultValue: unknown;
|
|
113
|
+
};
|
|
114
|
+
internetAccountId: {
|
|
115
|
+
type: "string";
|
|
116
|
+
} & {
|
|
117
|
+
defaultValue: string;
|
|
118
|
+
};
|
|
119
|
+
name: {
|
|
120
|
+
type: "string";
|
|
121
|
+
} & {
|
|
37
122
|
defaultValue: string;
|
|
38
123
|
};
|
|
39
124
|
needsPKCE: {
|
|
40
|
-
|
|
41
|
-
|
|
125
|
+
type: "boolean";
|
|
126
|
+
} & {
|
|
42
127
|
defaultValue: boolean;
|
|
43
128
|
};
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
129
|
+
responseType: {
|
|
130
|
+
type: "string";
|
|
131
|
+
} & {
|
|
47
132
|
defaultValue: string;
|
|
48
133
|
};
|
|
49
134
|
scopes: {
|
|
50
|
-
|
|
51
|
-
|
|
135
|
+
type: "string";
|
|
136
|
+
} & {
|
|
52
137
|
defaultValue: string;
|
|
53
138
|
};
|
|
54
139
|
state: {
|
|
55
|
-
|
|
56
|
-
|
|
140
|
+
type: "string";
|
|
141
|
+
} & {
|
|
57
142
|
defaultValue: string;
|
|
58
143
|
};
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
144
|
+
tokenEndpoint: {
|
|
145
|
+
type: "string";
|
|
146
|
+
} & {
|
|
147
|
+
defaultValue: string;
|
|
148
|
+
};
|
|
149
|
+
tokenType: {
|
|
150
|
+
type: "string";
|
|
151
|
+
} & {
|
|
152
|
+
defaultValue: string;
|
|
153
|
+
};
|
|
154
|
+
type: {
|
|
155
|
+
type: "string";
|
|
156
|
+
} & {
|
|
62
157
|
defaultValue: string;
|
|
63
158
|
};
|
|
64
159
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
65
|
-
name: {
|
|
66
|
-
|
|
67
|
-
|
|
160
|
+
readonly name: {
|
|
161
|
+
type: "string";
|
|
162
|
+
} & {
|
|
68
163
|
defaultValue: string;
|
|
69
164
|
};
|
|
70
|
-
description: {
|
|
71
|
-
|
|
72
|
-
|
|
165
|
+
readonly description: {
|
|
166
|
+
type: "string";
|
|
167
|
+
} & {
|
|
73
168
|
defaultValue: string;
|
|
74
169
|
};
|
|
75
|
-
authHeader: {
|
|
76
|
-
|
|
77
|
-
|
|
170
|
+
readonly authHeader: {
|
|
171
|
+
type: "string";
|
|
172
|
+
} & {
|
|
78
173
|
defaultValue: string;
|
|
79
174
|
};
|
|
80
|
-
tokenType: {
|
|
81
|
-
|
|
82
|
-
|
|
175
|
+
readonly tokenType: {
|
|
176
|
+
type: "string";
|
|
177
|
+
} & {
|
|
83
178
|
defaultValue: string;
|
|
84
179
|
};
|
|
85
|
-
domains: {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
defaultValue:
|
|
180
|
+
readonly domains: {
|
|
181
|
+
type: "stringArray";
|
|
182
|
+
} & {
|
|
183
|
+
defaultValue: unknown;
|
|
184
|
+
};
|
|
185
|
+
type: {
|
|
186
|
+
type: "string";
|
|
187
|
+
} & {
|
|
188
|
+
defaultValue: string;
|
|
189
|
+
};
|
|
190
|
+
internetAccountId: {
|
|
191
|
+
type: "string";
|
|
192
|
+
} & {
|
|
193
|
+
defaultValue: string;
|
|
89
194
|
};
|
|
90
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "internetAccountId">>, undefined>>, undefined>>;
|
|
195
|
+
}, 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
196
|
export type GoogleDriveOAuthInternetAccountConfigModel = typeof GoogleDriveOAuthConfigSchema;
|
|
92
197
|
export type GoogleDriveOAuthInternetAccountConfig = Instance<GoogleDriveOAuthInternetAccountConfigModel>;
|
|
93
198
|
export default GoogleDriveOAuthConfigSchema;
|
|
@@ -1,28 +1,57 @@
|
|
|
1
1
|
import { ConfigurationSchema } from '@jbrowse/core/configuration';
|
|
2
|
-
import OAuthConfigSchema from
|
|
3
|
-
|
|
2
|
+
import OAuthConfigSchema from '../OAuthModel/configSchema.js';
|
|
3
|
+
/**
|
|
4
|
+
* #config GoogleDriveOAuthInternetAccount
|
|
5
|
+
*
|
|
6
|
+
* #example
|
|
7
|
+
* The Google endpoints and scopes are pre-filled, so an entry needs only your
|
|
8
|
+
* own OAuth app's `clientId`.
|
|
9
|
+
* ```js
|
|
10
|
+
* {
|
|
11
|
+
* type: 'GoogleDriveOAuthInternetAccount',
|
|
12
|
+
* internetAccountId: 'googleDriveOAuth',
|
|
13
|
+
* name: 'Google Drive',
|
|
14
|
+
* clientId: 'your-client-id.apps.googleusercontent.com',
|
|
15
|
+
* }
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
4
18
|
const GoogleDriveOAuthConfigSchema = ConfigurationSchema('GoogleDriveOAuthInternetAccount', {
|
|
19
|
+
/**
|
|
20
|
+
* #slot
|
|
21
|
+
*/
|
|
5
22
|
authEndpoint: {
|
|
6
23
|
description: 'the authorization code endpoint of the internet account',
|
|
7
24
|
type: 'string',
|
|
8
25
|
defaultValue: 'https://accounts.google.com/o/oauth2/v2/auth',
|
|
9
26
|
},
|
|
27
|
+
/**
|
|
28
|
+
* #slot
|
|
29
|
+
*/
|
|
10
30
|
scopes: {
|
|
11
31
|
description: 'optional scopes for the authorization call',
|
|
12
32
|
type: 'string',
|
|
13
33
|
defaultValue: 'https://www.googleapis.com/auth/drive.readonly',
|
|
14
34
|
},
|
|
35
|
+
/**
|
|
36
|
+
* #slot
|
|
37
|
+
*/
|
|
15
38
|
domains: {
|
|
16
39
|
description: 'array of valid domains the url can contain to use this account',
|
|
17
40
|
type: 'stringArray',
|
|
18
|
-
defaultValue: ['drive.google.com
|
|
41
|
+
defaultValue: ['drive.google.com'],
|
|
19
42
|
},
|
|
43
|
+
/**
|
|
44
|
+
* #slot
|
|
45
|
+
*/
|
|
20
46
|
responseType: {
|
|
21
47
|
description: 'the type of response from the authorization endpoint',
|
|
22
48
|
type: 'string',
|
|
23
49
|
defaultValue: 'token',
|
|
24
50
|
},
|
|
25
51
|
}, {
|
|
52
|
+
/**
|
|
53
|
+
* #baseConfiguration
|
|
54
|
+
*/
|
|
26
55
|
baseConfiguration: OAuthConfigSchema,
|
|
27
56
|
explicitlyTyped: true,
|
|
28
57
|
});
|
|
@@ -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';
|