@jbrowse/plugin-authentication 2.4.2 → 2.6.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/dist/DropboxOAuthModel/configSchema.d.ts +105 -1
- package/dist/DropboxOAuthModel/configSchema.js +0 -8
- package/dist/DropboxOAuthModel/configSchema.js.map +1 -1
- package/dist/DropboxOAuthModel/model.d.ts +304 -8
- package/dist/DropboxOAuthModel/model.js +26 -35
- package/dist/DropboxOAuthModel/model.js.map +1 -1
- package/dist/DropboxOAuthModel/util.d.ts +1 -0
- package/dist/DropboxOAuthModel/util.js +28 -0
- package/dist/DropboxOAuthModel/util.js.map +1 -0
- package/dist/ExternalTokenModel/ExternalTokenEntryForm.d.ts +2 -2
- package/dist/ExternalTokenModel/ExternalTokenEntryForm.js +10 -11
- package/dist/ExternalTokenModel/ExternalTokenEntryForm.js.map +1 -1
- package/dist/ExternalTokenModel/configSchema.d.ts +36 -1
- package/dist/ExternalTokenModel/model.d.ts +93 -3
- package/dist/GoogleDriveOAuthModel/GoogleDriveFilehandle.d.ts +15 -0
- package/dist/GoogleDriveOAuthModel/GoogleDriveFilehandle.js +20 -0
- package/dist/GoogleDriveOAuthModel/GoogleDriveFilehandle.js.map +1 -0
- package/dist/GoogleDriveOAuthModel/configSchema.d.ts +105 -1
- package/dist/GoogleDriveOAuthModel/model.d.ts +219 -20
- package/dist/GoogleDriveOAuthModel/model.js +38 -51
- package/dist/GoogleDriveOAuthModel/model.js.map +1 -1
- package/dist/GoogleDriveOAuthModel/util.d.ts +1 -0
- package/dist/GoogleDriveOAuthModel/util.js +17 -0
- package/dist/GoogleDriveOAuthModel/util.js.map +1 -0
- package/dist/HTTPBasicModel/HTTPBasicLoginForm.d.ts +2 -2
- package/dist/HTTPBasicModel/HTTPBasicLoginForm.js +17 -21
- package/dist/HTTPBasicModel/HTTPBasicLoginForm.js.map +1 -1
- package/dist/HTTPBasicModel/configSchema.d.ts +44 -1
- package/dist/HTTPBasicModel/model.d.ts +135 -3
- package/dist/HTTPBasicModel/model.js +24 -9
- package/dist/HTTPBasicModel/model.js.map +1 -1
- package/dist/OAuthModel/configSchema.d.ts +94 -1
- package/dist/OAuthModel/configSchema.js +1 -9
- package/dist/OAuthModel/configSchema.js.map +1 -1
- package/dist/OAuthModel/model.d.ts +263 -8
- package/dist/OAuthModel/model.js +165 -113
- package/dist/OAuthModel/model.js.map +1 -1
- package/dist/OAuthModel/util.d.ts +7 -0
- package/dist/OAuthModel/util.js +60 -0
- package/dist/OAuthModel/util.js.map +1 -0
- package/dist/index.d.ts +954 -105
- package/dist/util.d.ts +6 -0
- package/dist/util.js +23 -0
- package/dist/util.js.map +1 -0
- package/esm/DropboxOAuthModel/configSchema.d.ts +105 -1
- package/esm/DropboxOAuthModel/configSchema.js +0 -8
- package/esm/DropboxOAuthModel/configSchema.js.map +1 -1
- package/esm/DropboxOAuthModel/model.d.ts +304 -8
- package/esm/DropboxOAuthModel/model.js +26 -35
- package/esm/DropboxOAuthModel/model.js.map +1 -1
- package/esm/DropboxOAuthModel/util.d.ts +1 -0
- package/esm/DropboxOAuthModel/util.js +24 -0
- package/esm/DropboxOAuthModel/util.js.map +1 -0
- package/esm/ExternalTokenModel/ExternalTokenEntryForm.d.ts +2 -2
- package/esm/ExternalTokenModel/ExternalTokenEntryForm.js +10 -11
- package/esm/ExternalTokenModel/ExternalTokenEntryForm.js.map +1 -1
- package/esm/ExternalTokenModel/configSchema.d.ts +36 -1
- package/esm/ExternalTokenModel/model.d.ts +93 -3
- package/esm/GoogleDriveOAuthModel/GoogleDriveFilehandle.d.ts +15 -0
- package/esm/GoogleDriveOAuthModel/GoogleDriveFilehandle.js +16 -0
- package/esm/GoogleDriveOAuthModel/GoogleDriveFilehandle.js.map +1 -0
- package/esm/GoogleDriveOAuthModel/configSchema.d.ts +105 -1
- package/esm/GoogleDriveOAuthModel/model.d.ts +219 -20
- package/esm/GoogleDriveOAuthModel/model.js +37 -49
- package/esm/GoogleDriveOAuthModel/model.js.map +1 -1
- package/esm/GoogleDriveOAuthModel/util.d.ts +1 -0
- package/esm/GoogleDriveOAuthModel/util.js +13 -0
- package/esm/GoogleDriveOAuthModel/util.js.map +1 -0
- package/esm/HTTPBasicModel/HTTPBasicLoginForm.d.ts +2 -2
- package/esm/HTTPBasicModel/HTTPBasicLoginForm.js +18 -22
- package/esm/HTTPBasicModel/HTTPBasicLoginForm.js.map +1 -1
- package/esm/HTTPBasicModel/configSchema.d.ts +44 -1
- package/esm/HTTPBasicModel/model.d.ts +135 -3
- package/esm/HTTPBasicModel/model.js +24 -9
- package/esm/HTTPBasicModel/model.js.map +1 -1
- package/esm/OAuthModel/configSchema.d.ts +94 -1
- package/esm/OAuthModel/configSchema.js +1 -9
- package/esm/OAuthModel/configSchema.js.map +1 -1
- package/esm/OAuthModel/model.d.ts +263 -8
- package/esm/OAuthModel/model.js +164 -86
- package/esm/OAuthModel/model.js.map +1 -1
- package/esm/OAuthModel/util.d.ts +7 -0
- package/esm/OAuthModel/util.js +30 -0
- package/esm/OAuthModel/util.js.map +1 -0
- package/esm/index.d.ts +954 -105
- package/esm/util.d.ts +6 -0
- package/esm/util.js +18 -0
- package/esm/util.js.map +1 -0
- package/package.json +3 -4
- package/src/DropboxOAuthModel/configSchema.ts +0 -8
- package/src/DropboxOAuthModel/model.tsx +35 -54
- package/src/DropboxOAuthModel/util.ts +36 -0
- package/src/ExternalTokenModel/ExternalTokenEntryForm.tsx +39 -41
- package/src/GoogleDriveOAuthModel/GoogleDriveFilehandle.ts +38 -0
- package/src/GoogleDriveOAuthModel/model.tsx +54 -104
- package/src/GoogleDriveOAuthModel/util.ts +29 -0
- package/src/HTTPBasicModel/HTTPBasicLoginForm.tsx +53 -56
- package/src/HTTPBasicModel/model.tsx +26 -11
- package/src/OAuthModel/configSchema.ts +2 -9
- package/src/OAuthModel/model.tsx +190 -108
- package/src/OAuthModel/util.ts +33 -0
- package/src/util.ts +25 -0
|
@@ -1,70 +1,57 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ConfigurationReference } from '@jbrowse/core/configuration';
|
|
3
3
|
import { types } from 'mobx-state-tree';
|
|
4
|
-
import { RemoteFileWithRangeCache } from '@jbrowse/core/util/io';
|
|
5
4
|
import { SvgIcon } from '@mui/material';
|
|
6
5
|
import baseModel from '../OAuthModel/model';
|
|
7
6
|
import { configSchema as OAuthConfigSchema } from '../OAuthModel';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
super(source, opts);
|
|
11
|
-
this.statsPromise = this.fetch(source, {
|
|
12
|
-
metadataOnly: true,
|
|
13
|
-
}).then((response) => response.json());
|
|
14
|
-
}
|
|
15
|
-
async fetch(input, opts) {
|
|
16
|
-
return super.fetch(input, opts);
|
|
17
|
-
}
|
|
18
|
-
async stat() {
|
|
19
|
-
return this.statsPromise;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
7
|
+
import { getDescriptiveErrorMessage } from './util';
|
|
8
|
+
import { GoogleDriveFile } from './GoogleDriveFilehandle';
|
|
22
9
|
function GoogleDriveIcon(props) {
|
|
23
10
|
return (React.createElement(SvgIcon, { ...props },
|
|
24
11
|
React.createElement("path", { d: "M7.71,3.5L1.15,15L4.58,21L11.13,9.5M9.73,15L6.3,21H19.42L22.85,15M22.28,14L15.42,2H8.58L8.57,2L15.43,14H22.28Z" })));
|
|
25
12
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
errorMessage = await response.text();
|
|
30
|
-
}
|
|
31
|
-
catch (error) {
|
|
32
|
-
errorMessage = '';
|
|
33
|
-
}
|
|
34
|
-
if (errorMessage) {
|
|
35
|
-
let errorMessageParsed;
|
|
36
|
-
try {
|
|
37
|
-
errorMessageParsed = JSON.parse(errorMessage);
|
|
38
|
-
}
|
|
39
|
-
catch (error) {
|
|
40
|
-
errorMessageParsed = undefined;
|
|
41
|
-
}
|
|
42
|
-
if (errorMessageParsed) {
|
|
43
|
-
errorMessage = errorMessageParsed.error.message;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
return `Network response failure — ${response.status} (${response.statusText})${errorMessage ? ` (${errorMessage})` : ''}`;
|
|
13
|
+
function getUri(str) {
|
|
14
|
+
const urlId = str.match(/[-\w]{25,}/);
|
|
15
|
+
return `https://www.googleapis.com/drive/v3/files/${urlId}`;
|
|
47
16
|
}
|
|
48
|
-
|
|
17
|
+
/**
|
|
18
|
+
* #stateModel GoogleDriveOAuthInternetAccount
|
|
19
|
+
*/
|
|
20
|
+
export default function stateModelFactory(configSchema) {
|
|
49
21
|
return baseModel(OAuthConfigSchema)
|
|
50
22
|
.named('GoogleDriveOAuthInternetAccount')
|
|
51
23
|
.props({
|
|
24
|
+
/**
|
|
25
|
+
* #property
|
|
26
|
+
*/
|
|
52
27
|
type: types.literal('GoogleDriveOAuthInternetAccount'),
|
|
28
|
+
/**
|
|
29
|
+
* #property
|
|
30
|
+
*/
|
|
53
31
|
configuration: ConfigurationReference(configSchema),
|
|
54
32
|
})
|
|
55
33
|
.views(() => ({
|
|
34
|
+
/**
|
|
35
|
+
* #getter
|
|
36
|
+
* The FileSelector icon for Google drive
|
|
37
|
+
*/
|
|
56
38
|
get toggleContents() {
|
|
57
39
|
return React.createElement(GoogleDriveIcon, null);
|
|
58
40
|
},
|
|
41
|
+
/**
|
|
42
|
+
* #getter
|
|
43
|
+
*/
|
|
59
44
|
get selectorLabel() {
|
|
60
45
|
return 'Enter Google Drive share link';
|
|
61
46
|
},
|
|
62
47
|
}))
|
|
63
48
|
.actions(self => ({
|
|
49
|
+
/**
|
|
50
|
+
* #method
|
|
51
|
+
*/
|
|
64
52
|
getFetcher(location) {
|
|
65
53
|
return async (input, init) => {
|
|
66
|
-
const
|
|
67
|
-
const driveUrl = new URL(`https://www.googleapis.com/drive/v3/files/${urlId}`);
|
|
54
|
+
const driveUrl = new URL(getUri(String(input)));
|
|
68
55
|
const searchParams = new URLSearchParams();
|
|
69
56
|
if (init === null || init === void 0 ? void 0 : init.metadataOnly) {
|
|
70
57
|
searchParams.append('fields', 'size');
|
|
@@ -74,35 +61,36 @@ const stateModelFactory = (configSchema) => {
|
|
|
74
61
|
}
|
|
75
62
|
driveUrl.search = searchParams.toString();
|
|
76
63
|
const authToken = await self.getToken(location);
|
|
77
|
-
const
|
|
78
|
-
const response = await fetch(driveUrl.toString(), newInit);
|
|
64
|
+
const response = await fetch(driveUrl, self.addAuthHeaderToInit({ ...init, method: 'GET', credentials: 'same-origin' }, authToken));
|
|
79
65
|
if (!response.ok) {
|
|
80
|
-
|
|
81
|
-
throw new Error(message);
|
|
66
|
+
throw new Error(await getDescriptiveErrorMessage(response));
|
|
82
67
|
}
|
|
83
68
|
return response;
|
|
84
69
|
};
|
|
85
70
|
},
|
|
71
|
+
/**
|
|
72
|
+
* #method
|
|
73
|
+
*/
|
|
86
74
|
openLocation(location) {
|
|
87
75
|
return new GoogleDriveFile(location.uri, {
|
|
88
76
|
fetch: this.getFetcher(location),
|
|
89
77
|
});
|
|
90
78
|
},
|
|
79
|
+
/**
|
|
80
|
+
* #action
|
|
81
|
+
*/
|
|
91
82
|
async validateToken(token, location) {
|
|
92
|
-
const
|
|
93
|
-
const response = await fetch(`https://www.googleapis.com/drive/v3/files/${urlId}`, {
|
|
83
|
+
const response = await fetch(getUri(location.uri), {
|
|
94
84
|
headers: {
|
|
95
85
|
Authorization: `Bearer ${token}`,
|
|
96
86
|
'Content-Type': 'application/x-www-form-urlencoded',
|
|
97
87
|
},
|
|
98
88
|
});
|
|
99
89
|
if (!response.ok) {
|
|
100
|
-
|
|
101
|
-
throw new Error(`Token could not be validated. ${message}`);
|
|
90
|
+
throw new Error(await getDescriptiveErrorMessage(response, 'Token could not be validated'));
|
|
102
91
|
}
|
|
103
92
|
return token;
|
|
104
93
|
},
|
|
105
94
|
}));
|
|
106
|
-
}
|
|
107
|
-
export default stateModelFactory;
|
|
95
|
+
}
|
|
108
96
|
//# sourceMappingURL=model.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../src/GoogleDriveOAuthModel/model.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AACpE,OAAO,EAAY,KAAK,EAAE,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../src/GoogleDriveOAuthModel/model.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AACpE,OAAO,EAAY,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAEjD,OAAO,EAAgB,OAAO,EAAE,MAAM,eAAe,CAAA;AAIrD,OAAO,SAAS,MAAM,qBAAqB,CAAA;AAC3C,OAAO,EAAE,YAAY,IAAI,iBAAiB,EAAE,MAAM,eAAe,CAAA;AACjE,OAAO,EAAE,0BAA0B,EAAE,MAAM,QAAQ,CAAA;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAMzD,SAAS,eAAe,CAAC,KAAmB;IAC1C,OAAO,CACL,oBAAC,OAAO,OAAK,KAAK;QAChB,8BAAM,CAAC,EAAC,gHAAgH,GAAG,CACnH,CACX,CAAA;AACH,CAAC;AAED,SAAS,MAAM,CAAC,GAAW;IACzB,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,YAAY,CAAC,CAAA;IACrC,OAAO,6CAA6C,KAAK,EAAE,CAAA;AAC7D,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB,CACvC,YAAwD;IAExD,OAAO,SAAS,CAAC,iBAAiB,CAAC;SAChC,KAAK,CAAC,iCAAiC,CAAC;SACxC,KAAK,CAAC;QACL;;WAEG;QACH,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,iCAAiC,CAAC;QACtD;;WAEG;QACH,aAAa,EAAE,sBAAsB,CAAC,YAAY,CAAC;KACpD,CAAC;SACD,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;QACZ;;;WAGG;QACH,IAAI,cAAc;YAChB,OAAO,oBAAC,eAAe,OAAG,CAAA;QAC5B,CAAC;QACD;;WAEG;QACH,IAAI,aAAa;YACf,OAAO,+BAA+B,CAAA;QACxC,CAAC;KACF,CAAC,CAAC;SACF,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAChB;;WAEG;QACH,UAAU,CAAC,QAAsB;YAC/B,OAAO,KAAK,EAAE,KAAkB,EAAE,IAA8B,EAAE,EAAE;gBAClE,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;gBAC/C,MAAM,YAAY,GAAG,IAAI,eAAe,EAAE,CAAA;gBAC1C,IAAI,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,YAAY,EAAE;oBACtB,YAAY,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;iBACtC;qBAAM;oBACL,YAAY,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;iBACpC;gBACD,QAAQ,CAAC,MAAM,GAAG,YAAY,CAAC,QAAQ,EAAE,CAAA;gBACzC,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;gBAC/C,MAAM,QAAQ,GAAG,MAAM,KAAK,CAC1B,QAAQ,EACR,IAAI,CAAC,mBAAmB,CACtB,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,EACtD,SAAS,CACV,CACF,CAAA;gBACD,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE;oBAChB,MAAM,IAAI,KAAK,CAAC,MAAM,0BAA0B,CAAC,QAAQ,CAAC,CAAC,CAAA;iBAC5D;gBACD,OAAO,QAAQ,CAAA;YACjB,CAAC,CAAA;QACH,CAAC;QACD;;WAEG;QACH,YAAY,CAAC,QAAqB;YAChC,OAAO,IAAI,eAAe,CAAC,QAAQ,CAAC,GAAG,EAAE;gBACvC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC;aACjC,CAAC,CAAA;QACJ,CAAC;QACD;;WAEG;QACH,KAAK,CAAC,aAAa,CAAC,KAAa,EAAE,QAAqB;YACtD,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;gBACjD,OAAO,EAAE;oBACP,aAAa,EAAE,UAAU,KAAK,EAAE;oBAChC,cAAc,EAAE,mCAAmC;iBACpD;aACF,CAAC,CAAA;YACF,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE;gBAChB,MAAM,IAAI,KAAK,CACb,MAAM,0BAA0B,CAC9B,QAAQ,EACR,8BAA8B,CAC/B,CACF,CAAA;aACF;YACD,OAAO,KAAK,CAAA;QACd,CAAC;KACF,CAAC,CAAC,CAAA;AACP,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getDescriptiveErrorMessage(response: Response, reason?: string): Promise<string>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { getResponseError } from '../util';
|
|
2
|
+
export async function getDescriptiveErrorMessage(response, reason) {
|
|
3
|
+
let errorMessage = '';
|
|
4
|
+
try {
|
|
5
|
+
const err = JSON.parse(await response.text());
|
|
6
|
+
errorMessage = err.error.message;
|
|
7
|
+
}
|
|
8
|
+
catch (error) {
|
|
9
|
+
/* do nothing */
|
|
10
|
+
}
|
|
11
|
+
return getResponseError({ response, reason, statusText: errorMessage });
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/GoogleDriveOAuthModel/util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAgB1C,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAC9C,QAAkB,EAClB,MAAe;IAEf,IAAI,YAAY,GAAG,EAAE,CAAA;IACrB,IAAI;QACF,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAqB,CAAA;QACjE,YAAY,GAAG,GAAG,CAAC,KAAK,CAAC,OAAO,CAAA;KACjC;IAAC,OAAO,KAAK,EAAE;QACd,gBAAgB;KACjB;IACD,OAAO,gBAAgB,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC,CAAA;AACzE,CAAC"}
|
|
@@ -1,28 +1,24 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import { Button,
|
|
2
|
+
import { Button, DialogContent, DialogActions, TextField } from '@mui/material';
|
|
3
|
+
import { Dialog } from '@jbrowse/core/ui';
|
|
3
4
|
export const HTTPBasicLoginForm = ({ internetAccountId, handleClose, }) => {
|
|
4
5
|
const [username, setUsername] = useState('');
|
|
5
6
|
const [password, setPassword] = useState('');
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
React.createElement(
|
|
22
|
-
React.createElement(TextField, { required: true, label: "Username", variant: "outlined", inputProps: { 'data-testid': 'login-httpbasic-username' }, onChange: event => setUsername(event.target.value), margin: "dense" }),
|
|
23
|
-
React.createElement(TextField, { required: true, label: "Password", type: "password", autoComplete: "current-password", variant: "outlined", inputProps: { 'data-testid': 'login-httpbasic-password' }, onChange: event => setPassword(event.target.value), margin: "dense" })),
|
|
24
|
-
React.createElement(DialogActions, null,
|
|
25
|
-
React.createElement(Button, { variant: "contained", color: "primary", type: "submit" }, "Submit"),
|
|
26
|
-
React.createElement(Button, { variant: "contained", type: "submit", onClick: () => handleClose() }, "Cancel"))))));
|
|
7
|
+
return (React.createElement(Dialog, { open: true, maxWidth: "xl", "data-testid": "login-httpbasic", title: `Log In for ${internetAccountId}` },
|
|
8
|
+
React.createElement("form", { onSubmit: event => {
|
|
9
|
+
if (username && password) {
|
|
10
|
+
handleClose(btoa(`${username}:${password}`));
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
|
+
handleClose();
|
|
14
|
+
}
|
|
15
|
+
event.preventDefault();
|
|
16
|
+
} },
|
|
17
|
+
React.createElement(DialogContent, { style: { display: 'flex', flexDirection: 'column' } },
|
|
18
|
+
React.createElement(TextField, { required: true, label: "Username", variant: "outlined", inputProps: { 'data-testid': 'login-httpbasic-username' }, onChange: event => setUsername(event.target.value), margin: "dense" }),
|
|
19
|
+
React.createElement(TextField, { required: true, label: "Password", type: "password", autoComplete: "current-password", variant: "outlined", inputProps: { 'data-testid': 'login-httpbasic-password' }, onChange: event => setPassword(event.target.value), margin: "dense" })),
|
|
20
|
+
React.createElement(DialogActions, null,
|
|
21
|
+
React.createElement(Button, { variant: "contained", color: "primary", type: "submit" }, "Submit"),
|
|
22
|
+
React.createElement(Button, { variant: "contained", color: "secondary", type: "submit", onClick: () => handleClose() }, "Cancel")))));
|
|
27
23
|
};
|
|
28
24
|
//# sourceMappingURL=HTTPBasicLoginForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HTTPBasicLoginForm.js","sourceRoot":"","sources":["../../src/HTTPBasicModel/HTTPBasicLoginForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACvC,OAAO,
|
|
1
|
+
{"version":3,"file":"HTTPBasicLoginForm.js","sourceRoot":"","sources":["../../src/HTTPBasicModel/HTTPBasicLoginForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACvC,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC/E,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAEzC,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,EACjC,iBAAiB,EACjB,WAAW,GAIZ,EAAE,EAAE;IACH,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAA;IAC5C,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAA;IAE5C,OAAO,CACL,oBAAC,MAAM,IACL,IAAI,QACJ,QAAQ,EAAC,IAAI,iBACD,iBAAiB,EAC7B,KAAK,EAAE,cAAc,iBAAiB,EAAE;QAExC,8BACE,QAAQ,EAAE,KAAK,CAAC,EAAE;gBAChB,IAAI,QAAQ,IAAI,QAAQ,EAAE;oBACxB,WAAW,CAAC,IAAI,CAAC,GAAG,QAAQ,IAAI,QAAQ,EAAE,CAAC,CAAC,CAAA;iBAC7C;qBAAM;oBACL,WAAW,EAAE,CAAA;iBACd;gBACD,KAAK,CAAC,cAAc,EAAE,CAAA;YACxB,CAAC;YAED,oBAAC,aAAa,IAAC,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE;gBAChE,oBAAC,SAAS,IACR,QAAQ,QACR,KAAK,EAAC,UAAU,EAChB,OAAO,EAAC,UAAU,EAClB,UAAU,EAAE,EAAE,aAAa,EAAE,0BAA0B,EAAE,EACzD,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EAClD,MAAM,EAAC,OAAO,GACd;gBACF,oBAAC,SAAS,IACR,QAAQ,QACR,KAAK,EAAC,UAAU,EAChB,IAAI,EAAC,UAAU,EACf,YAAY,EAAC,kBAAkB,EAC/B,OAAO,EAAC,UAAU,EAClB,UAAU,EAAE,EAAE,aAAa,EAAE,0BAA0B,EAAE,EACzD,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EAClD,MAAM,EAAC,OAAO,GACd,CACY;YAChB,oBAAC,aAAa;gBACZ,oBAAC,MAAM,IAAC,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,SAAS,EAAC,IAAI,EAAC,QAAQ,aAEhD;gBACT,oBAAC,MAAM,IACL,OAAO,EAAC,WAAW,EACnB,KAAK,EAAC,WAAW,EACjB,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,EAAE,aAGrB,CACK,CACX,CACA,CACV,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,5 +1,48 @@
|
|
|
1
1
|
import { Instance } from 'mobx-state-tree';
|
|
2
|
-
declare const HTTPBasicConfigSchema: import("@jbrowse/core/configuration").
|
|
2
|
+
declare const HTTPBasicConfigSchema: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
3
|
+
/**
|
|
4
|
+
* #slot
|
|
5
|
+
*/
|
|
6
|
+
tokenType: {
|
|
7
|
+
description: string;
|
|
8
|
+
type: string;
|
|
9
|
+
defaultValue: string;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* #slot
|
|
13
|
+
*/
|
|
14
|
+
validateWithHEAD: {
|
|
15
|
+
description: string;
|
|
16
|
+
type: string;
|
|
17
|
+
defaultValue: boolean;
|
|
18
|
+
};
|
|
19
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
20
|
+
name: {
|
|
21
|
+
description: string;
|
|
22
|
+
type: string;
|
|
23
|
+
defaultValue: string;
|
|
24
|
+
};
|
|
25
|
+
description: {
|
|
26
|
+
description: string;
|
|
27
|
+
type: string;
|
|
28
|
+
defaultValue: string;
|
|
29
|
+
};
|
|
30
|
+
authHeader: {
|
|
31
|
+
description: string;
|
|
32
|
+
type: string;
|
|
33
|
+
defaultValue: string;
|
|
34
|
+
};
|
|
35
|
+
tokenType: {
|
|
36
|
+
description: string;
|
|
37
|
+
type: string;
|
|
38
|
+
defaultValue: string;
|
|
39
|
+
};
|
|
40
|
+
domains: {
|
|
41
|
+
description: string;
|
|
42
|
+
type: string;
|
|
43
|
+
defaultValue: never[];
|
|
44
|
+
};
|
|
45
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "internetAccountId">>, undefined>>;
|
|
3
46
|
export type HTTPBasicInternetAccountConfigModel = typeof HTTPBasicConfigSchema;
|
|
4
47
|
export type HTTPBasicInternetAccountConfig = Instance<HTTPBasicInternetAccountConfigModel>;
|
|
5
48
|
export default HTTPBasicConfigSchema;
|
|
@@ -1,13 +1,136 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { UriLocation } from '@jbrowse/core/util/types';
|
|
3
|
-
import { HTTPBasicInternetAccountConfigModel } from './configSchema';
|
|
4
3
|
import { Instance } from 'mobx-state-tree';
|
|
5
|
-
|
|
4
|
+
/**
|
|
5
|
+
* #stateModel HTTPBasicInternetAccount
|
|
6
|
+
*/
|
|
7
|
+
declare const stateModelFactory: (configSchema: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
8
|
+
tokenType: {
|
|
9
|
+
description: string;
|
|
10
|
+
type: string;
|
|
11
|
+
defaultValue: string;
|
|
12
|
+
};
|
|
13
|
+
validateWithHEAD: {
|
|
14
|
+
description: string;
|
|
15
|
+
type: string;
|
|
16
|
+
defaultValue: boolean; /**
|
|
17
|
+
* #property
|
|
18
|
+
*/
|
|
19
|
+
};
|
|
20
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
21
|
+
name: {
|
|
22
|
+
description: string;
|
|
23
|
+
type: string;
|
|
24
|
+
defaultValue: string;
|
|
25
|
+
};
|
|
26
|
+
description: {
|
|
27
|
+
description: string;
|
|
28
|
+
type: string;
|
|
29
|
+
defaultValue: string;
|
|
30
|
+
};
|
|
31
|
+
authHeader: {
|
|
32
|
+
description: string;
|
|
33
|
+
type: string;
|
|
34
|
+
defaultValue: string;
|
|
35
|
+
};
|
|
36
|
+
tokenType: {
|
|
37
|
+
description: string;
|
|
38
|
+
type: string;
|
|
39
|
+
defaultValue: string;
|
|
40
|
+
};
|
|
41
|
+
domains: {
|
|
42
|
+
description: string;
|
|
43
|
+
type: string;
|
|
44
|
+
/**
|
|
45
|
+
* #property
|
|
46
|
+
*/
|
|
47
|
+
defaultValue: never[];
|
|
48
|
+
};
|
|
49
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "internetAccountId">>, undefined>>) => import("mobx-state-tree").IModelType<{
|
|
6
50
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
7
51
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
52
|
+
configuration: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
53
|
+
name: {
|
|
54
|
+
description: string;
|
|
55
|
+
type: string;
|
|
56
|
+
defaultValue: string;
|
|
57
|
+
}; /**
|
|
58
|
+
* #property
|
|
59
|
+
*/
|
|
60
|
+
description: {
|
|
61
|
+
description: string;
|
|
62
|
+
type: string;
|
|
63
|
+
defaultValue: string;
|
|
64
|
+
}; /**
|
|
65
|
+
* #getter
|
|
66
|
+
*/
|
|
67
|
+
authHeader: {
|
|
68
|
+
description: string;
|
|
69
|
+
type: string;
|
|
70
|
+
defaultValue: string;
|
|
71
|
+
};
|
|
72
|
+
tokenType: {
|
|
73
|
+
description: string;
|
|
74
|
+
type: string;
|
|
75
|
+
defaultValue: string;
|
|
76
|
+
};
|
|
77
|
+
domains: {
|
|
78
|
+
description: string;
|
|
79
|
+
type: string;
|
|
80
|
+
defaultValue: never[];
|
|
81
|
+
};
|
|
82
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "internetAccountId">>;
|
|
8
83
|
} & {
|
|
84
|
+
/**
|
|
85
|
+
* #property
|
|
86
|
+
*/
|
|
9
87
|
type: import("mobx-state-tree").ISimpleType<"HTTPBasicInternetAccount">;
|
|
10
|
-
|
|
88
|
+
/**
|
|
89
|
+
* #property
|
|
90
|
+
*/
|
|
91
|
+
configuration: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
92
|
+
tokenType: {
|
|
93
|
+
description: string;
|
|
94
|
+
type: string;
|
|
95
|
+
defaultValue: string;
|
|
96
|
+
};
|
|
97
|
+
validateWithHEAD: {
|
|
98
|
+
description: string;
|
|
99
|
+
type: string;
|
|
100
|
+
defaultValue: boolean; /**
|
|
101
|
+
* #property
|
|
102
|
+
*/
|
|
103
|
+
};
|
|
104
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
105
|
+
name: {
|
|
106
|
+
description: string;
|
|
107
|
+
type: string;
|
|
108
|
+
defaultValue: string;
|
|
109
|
+
};
|
|
110
|
+
description: {
|
|
111
|
+
description: string;
|
|
112
|
+
type: string;
|
|
113
|
+
defaultValue: string;
|
|
114
|
+
};
|
|
115
|
+
authHeader: {
|
|
116
|
+
description: string;
|
|
117
|
+
type: string;
|
|
118
|
+
defaultValue: string;
|
|
119
|
+
};
|
|
120
|
+
tokenType: {
|
|
121
|
+
description: string;
|
|
122
|
+
type: string;
|
|
123
|
+
defaultValue: string;
|
|
124
|
+
};
|
|
125
|
+
domains: {
|
|
126
|
+
description: string;
|
|
127
|
+
type: string;
|
|
128
|
+
/**
|
|
129
|
+
* #property
|
|
130
|
+
*/
|
|
131
|
+
defaultValue: never[];
|
|
132
|
+
};
|
|
133
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "internetAccountId">>, undefined>>;
|
|
11
134
|
}, {
|
|
12
135
|
readonly name: string;
|
|
13
136
|
readonly description: string;
|
|
@@ -57,9 +180,18 @@ declare const stateModelFactory: (configSchema: HTTPBasicInternetAccountConfigMo
|
|
|
57
180
|
} & {
|
|
58
181
|
openLocation(location: UriLocation): import("@jbrowse/core/util/io").RemoteFileWithRangeCache;
|
|
59
182
|
} & {
|
|
183
|
+
/**
|
|
184
|
+
* #getter
|
|
185
|
+
*/
|
|
60
186
|
readonly validateWithHEAD: boolean;
|
|
61
187
|
} & {
|
|
188
|
+
/**
|
|
189
|
+
* #action
|
|
190
|
+
*/
|
|
62
191
|
getTokenFromUser(resolve: (token: string) => void, reject: (error: Error) => void): void;
|
|
192
|
+
/**
|
|
193
|
+
* #action
|
|
194
|
+
*/
|
|
63
195
|
validateToken(token: string, location: UriLocation): Promise<string>;
|
|
64
196
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
65
197
|
export default stateModelFactory;
|
|
@@ -2,18 +2,34 @@ import { ConfigurationReference, getConf } from '@jbrowse/core/configuration';
|
|
|
2
2
|
import { InternetAccount } from '@jbrowse/core/pluggableElementTypes/models';
|
|
3
3
|
import { types, getRoot } from 'mobx-state-tree';
|
|
4
4
|
import { HTTPBasicLoginForm } from './HTTPBasicLoginForm';
|
|
5
|
+
import { getResponseError } from '../util';
|
|
6
|
+
/**
|
|
7
|
+
* #stateModel HTTPBasicInternetAccount
|
|
8
|
+
*/
|
|
5
9
|
const stateModelFactory = (configSchema) => {
|
|
6
10
|
return InternetAccount.named('HTTPBasicInternetAccount')
|
|
7
11
|
.props({
|
|
12
|
+
/**
|
|
13
|
+
* #property
|
|
14
|
+
*/
|
|
8
15
|
type: types.literal('HTTPBasicInternetAccount'),
|
|
16
|
+
/**
|
|
17
|
+
* #property
|
|
18
|
+
*/
|
|
9
19
|
configuration: ConfigurationReference(configSchema),
|
|
10
20
|
})
|
|
11
21
|
.views(self => ({
|
|
22
|
+
/**
|
|
23
|
+
* #getter
|
|
24
|
+
*/
|
|
12
25
|
get validateWithHEAD() {
|
|
13
26
|
return getConf(self, 'validateWithHEAD');
|
|
14
27
|
},
|
|
15
28
|
}))
|
|
16
29
|
.actions(self => ({
|
|
30
|
+
/**
|
|
31
|
+
* #action
|
|
32
|
+
*/
|
|
17
33
|
getTokenFromUser(resolve, reject) {
|
|
18
34
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
19
35
|
const { session } = getRoot(self);
|
|
@@ -26,13 +42,16 @@ const stateModelFactory = (configSchema) => {
|
|
|
26
42
|
resolve(token);
|
|
27
43
|
}
|
|
28
44
|
else {
|
|
29
|
-
reject(new Error('
|
|
45
|
+
reject(new Error('User cancelled entry'));
|
|
30
46
|
}
|
|
31
47
|
doneCallback();
|
|
32
48
|
},
|
|
33
49
|
},
|
|
34
50
|
]);
|
|
35
51
|
},
|
|
52
|
+
/**
|
|
53
|
+
* #action
|
|
54
|
+
*/
|
|
36
55
|
async validateToken(token, location) {
|
|
37
56
|
if (!self.validateWithHEAD) {
|
|
38
57
|
return token;
|
|
@@ -40,14 +59,10 @@ const stateModelFactory = (configSchema) => {
|
|
|
40
59
|
const newInit = self.addAuthHeaderToInit({ method: 'HEAD' }, token);
|
|
41
60
|
const response = await fetch(location.uri, newInit);
|
|
42
61
|
if (!response.ok) {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
catch (error) {
|
|
48
|
-
errorMessage = '';
|
|
49
|
-
}
|
|
50
|
-
throw new Error(`Error validating token — ${response.status} (${response.statusText})${errorMessage ? ` (${errorMessage})` : ''}`);
|
|
62
|
+
throw new Error(await getResponseError({
|
|
63
|
+
response,
|
|
64
|
+
reason: 'Error validating token',
|
|
65
|
+
}));
|
|
51
66
|
}
|
|
52
67
|
return token;
|
|
53
68
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../src/HTTPBasicModel/model.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAA;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAA;
|
|
1
|
+
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../src/HTTPBasicModel/model.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAA;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAA;AAE5E,OAAO,EAAY,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAI1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE1C;;GAEG;AACH,MAAM,iBAAiB,GAAG,CACxB,YAAiD,EACjD,EAAE;IACF,OAAO,eAAe,CAAC,KAAK,CAAC,0BAA0B,CAAC;SACrD,KAAK,CAAC;QACL;;WAEG;QACH,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,0BAA0B,CAAC;QAC/C;;WAEG;QACH,aAAa,EAAE,sBAAsB,CAAC,YAAY,CAAC;KACpD,CAAC;SACD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACd;;WAEG;QACH,IAAI,gBAAgB;YAClB,OAAO,OAAO,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAA;QAC1C,CAAC;KACF,CAAC,CAAC;SACF,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAChB;;WAEG;QACH,gBAAgB,CACd,OAAgC,EAChC,MAA8B;YAE9B,8DAA8D;YAC9D,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAM,IAAI,CAAC,CAAA;YACtC,OAAO,CAAC,WAAW,CAAC,CAAC,YAAwB,EAAE,EAAE,CAAC;gBAChD,kBAAkB;gBAClB;oBACE,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;oBACzC,WAAW,EAAE,CAAC,KAAa,EAAE,EAAE;wBAC7B,IAAI,KAAK,EAAE;4BACT,OAAO,CAAC,KAAK,CAAC,CAAA;yBACf;6BAAM;4BACL,MAAM,CAAC,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC,CAAA;yBAC1C;wBACD,YAAY,EAAE,CAAA;oBAChB,CAAC;iBACF;aACF,CAAC,CAAA;QACJ,CAAC;QACD;;WAEG;QACH,KAAK,CAAC,aAAa,CAAC,KAAa,EAAE,QAAqB;YACtD,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE;gBAC1B,OAAO,KAAK,CAAA;aACb;YACD,MAAM,OAAO,GAAG,IAAI,CAAC,mBAAmB,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,KAAK,CAAC,CAAA;YACnE,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;YACnD,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE;gBAChB,MAAM,IAAI,KAAK,CACb,MAAM,gBAAgB,CAAC;oBACrB,QAAQ;oBACR,MAAM,EAAE,wBAAwB;iBACjC,CAAC,CACH,CAAA;aACF;YACD,OAAO,KAAK,CAAA;QACd,CAAC;KACF,CAAC,CAAC,CAAA;AACP,CAAC,CAAA;AAED,eAAe,iBAAiB,CAAA"}
|
|
@@ -1,5 +1,98 @@
|
|
|
1
1
|
import { Instance } from 'mobx-state-tree';
|
|
2
|
-
declare const OAuthConfigSchema: import("@jbrowse/core/configuration").
|
|
2
|
+
declare const OAuthConfigSchema: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
3
|
+
/**
|
|
4
|
+
* #slot
|
|
5
|
+
*/
|
|
6
|
+
tokenType: {
|
|
7
|
+
description: string;
|
|
8
|
+
type: string;
|
|
9
|
+
defaultValue: string;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* #slot
|
|
13
|
+
*/
|
|
14
|
+
authEndpoint: {
|
|
15
|
+
description: string;
|
|
16
|
+
type: string;
|
|
17
|
+
defaultValue: string;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* #slot
|
|
21
|
+
*/
|
|
22
|
+
tokenEndpoint: {
|
|
23
|
+
description: string;
|
|
24
|
+
type: string;
|
|
25
|
+
defaultValue: string;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* #slot
|
|
29
|
+
*/
|
|
30
|
+
needsPKCE: {
|
|
31
|
+
description: string;
|
|
32
|
+
type: string;
|
|
33
|
+
defaultValue: boolean;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* #slot
|
|
37
|
+
*/
|
|
38
|
+
clientId: {
|
|
39
|
+
description: string;
|
|
40
|
+
type: string;
|
|
41
|
+
defaultValue: string;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* #slot
|
|
45
|
+
*/
|
|
46
|
+
scopes: {
|
|
47
|
+
description: string;
|
|
48
|
+
type: string;
|
|
49
|
+
defaultValue: string;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* #slot
|
|
53
|
+
*/
|
|
54
|
+
state: {
|
|
55
|
+
description: string;
|
|
56
|
+
type: string;
|
|
57
|
+
defaultValue: string;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* #slot
|
|
61
|
+
*/
|
|
62
|
+
responseType: {
|
|
63
|
+
description: string;
|
|
64
|
+
type: string;
|
|
65
|
+
defaultValue: string;
|
|
66
|
+
};
|
|
67
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
68
|
+
name: {
|
|
69
|
+
description: string;
|
|
70
|
+
type: string;
|
|
71
|
+
defaultValue: string;
|
|
72
|
+
};
|
|
73
|
+
description: {
|
|
74
|
+
description: string;
|
|
75
|
+
type: string;
|
|
76
|
+
defaultValue: string;
|
|
77
|
+
}; /**
|
|
78
|
+
* #slot
|
|
79
|
+
*/
|
|
80
|
+
authHeader: {
|
|
81
|
+
description: string;
|
|
82
|
+
type: string;
|
|
83
|
+
defaultValue: string;
|
|
84
|
+
};
|
|
85
|
+
tokenType: {
|
|
86
|
+
description: string;
|
|
87
|
+
type: string;
|
|
88
|
+
defaultValue: string;
|
|
89
|
+
};
|
|
90
|
+
domains: {
|
|
91
|
+
description: string;
|
|
92
|
+
type: string;
|
|
93
|
+
defaultValue: never[];
|
|
94
|
+
};
|
|
95
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "internetAccountId">>, undefined>>;
|
|
3
96
|
export type OAuthInternetAccountConfigModel = typeof OAuthConfigSchema;
|
|
4
97
|
export type OAuthInternetAccountConfig = Instance<OAuthInternetAccountConfigModel>;
|
|
5
98
|
export default OAuthConfigSchema;
|