@jbrowse/plugin-authentication 4.3.0 → 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,91 +1,118 @@
|
|
|
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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
/**
|
|
19
|
+
* #slot
|
|
20
|
+
*/
|
|
21
|
+
readonly authEndpoint: {
|
|
22
|
+
readonly description: "the authorization code endpoint of the internet account";
|
|
23
|
+
readonly type: "string";
|
|
24
|
+
readonly defaultValue: "https://accounts.google.com/o/oauth2/v2/auth";
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* #slot
|
|
28
|
+
*/
|
|
29
|
+
readonly scopes: {
|
|
30
|
+
readonly description: "optional scopes for the authorization call";
|
|
31
|
+
readonly type: "string";
|
|
32
|
+
readonly defaultValue: "https://www.googleapis.com/auth/drive.readonly";
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* #slot
|
|
36
|
+
*/
|
|
37
|
+
readonly domains: {
|
|
38
|
+
readonly description: "array of valid domains the url can contain to use this account";
|
|
39
|
+
readonly type: "stringArray";
|
|
40
|
+
readonly defaultValue: readonly ["drive.google.com"];
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* #slot
|
|
44
|
+
*/
|
|
45
|
+
readonly responseType: {
|
|
46
|
+
readonly description: "the type of response from the authorization endpoint";
|
|
47
|
+
readonly type: "string";
|
|
48
|
+
readonly defaultValue: "token";
|
|
22
49
|
};
|
|
23
50
|
}, 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:
|
|
51
|
+
readonly tokenType: {
|
|
52
|
+
readonly description: "a custom name for a token to include in the header";
|
|
53
|
+
readonly type: "string";
|
|
54
|
+
readonly defaultValue: "Bearer";
|
|
55
|
+
};
|
|
56
|
+
readonly authEndpoint: {
|
|
57
|
+
readonly description: "the authorization code endpoint of the internet account";
|
|
58
|
+
readonly type: "string";
|
|
59
|
+
readonly defaultValue: "";
|
|
60
|
+
};
|
|
61
|
+
readonly tokenEndpoint: {
|
|
62
|
+
readonly description: "the token endpoint of the internet account";
|
|
63
|
+
readonly type: "string";
|
|
64
|
+
readonly defaultValue: "";
|
|
65
|
+
};
|
|
66
|
+
readonly needsPKCE: {
|
|
67
|
+
readonly description: "boolean to indicate if the endpoint needs a PKCE code";
|
|
68
|
+
readonly type: "boolean";
|
|
69
|
+
readonly defaultValue: false;
|
|
70
|
+
};
|
|
71
|
+
readonly clientId: {
|
|
72
|
+
readonly description: "id for the OAuth application";
|
|
73
|
+
readonly type: "string";
|
|
74
|
+
readonly defaultValue: "";
|
|
75
|
+
};
|
|
76
|
+
readonly scopes: {
|
|
77
|
+
readonly description: "optional scopes for the authorization call";
|
|
78
|
+
readonly type: "string";
|
|
79
|
+
readonly defaultValue: "";
|
|
80
|
+
};
|
|
81
|
+
readonly state: {
|
|
82
|
+
readonly description: "optional state for the authorization call";
|
|
83
|
+
readonly type: "string";
|
|
84
|
+
readonly defaultValue: "";
|
|
85
|
+
};
|
|
86
|
+
readonly responseType: {
|
|
87
|
+
readonly description: "the type of response from the authorization endpoint. can be 'token' or 'code'";
|
|
88
|
+
readonly type: "string";
|
|
89
|
+
readonly defaultValue: "code";
|
|
63
90
|
};
|
|
64
91
|
}, 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:
|
|
92
|
+
readonly name: {
|
|
93
|
+
readonly description: "descriptive name of the internet account";
|
|
94
|
+
readonly type: "string";
|
|
95
|
+
readonly defaultValue: "";
|
|
96
|
+
};
|
|
97
|
+
readonly description: {
|
|
98
|
+
readonly description: "a description of the internet account";
|
|
99
|
+
readonly type: "string";
|
|
100
|
+
readonly defaultValue: "";
|
|
101
|
+
};
|
|
102
|
+
readonly authHeader: {
|
|
103
|
+
readonly description: "request header for credentials";
|
|
104
|
+
readonly type: "string";
|
|
105
|
+
readonly defaultValue: "Authorization";
|
|
106
|
+
};
|
|
107
|
+
readonly tokenType: {
|
|
108
|
+
readonly description: "a custom name for a token to include in the header";
|
|
109
|
+
readonly type: "string";
|
|
110
|
+
readonly defaultValue: "";
|
|
111
|
+
};
|
|
112
|
+
readonly domains: {
|
|
113
|
+
readonly description: "array of valid domains the url can contain to use this account";
|
|
114
|
+
readonly type: "stringArray";
|
|
115
|
+
readonly defaultValue: readonly [];
|
|
89
116
|
};
|
|
90
117
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "internetAccountId">>, undefined>>, undefined>>;
|
|
91
118
|
export type GoogleDriveOAuthInternetAccountConfigModel = typeof 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';
|