@jbrowse/plugin-authentication
Version:
JBrowse 2 Authentication
50 lines (49 loc) • 1.56 kB
JavaScript
import { ConfigurationSchema } from '@jbrowse/core/configuration';
import { BaseInternetAccountConfig } from '@jbrowse/core/pluggableElementTypes/models';
function x() { }
const OAuthConfigSchema = ConfigurationSchema('OAuthInternetAccount', {
tokenType: {
description: 'a custom name for a token to include in the header',
type: 'string',
defaultValue: 'Bearer',
},
authEndpoint: {
description: 'the authorization code endpoint of the internet account',
type: 'string',
defaultValue: '',
},
tokenEndpoint: {
description: 'the token endpoint of the internet account',
type: 'string',
defaultValue: '',
},
needsPKCE: {
description: 'boolean to indicate if the endpoint needs a PKCE code',
type: 'boolean',
defaultValue: false,
},
clientId: {
description: 'id for the OAuth application',
type: 'string',
defaultValue: '',
},
scopes: {
description: 'optional scopes for the authorization call',
type: 'string',
defaultValue: '',
},
state: {
description: 'optional state for the authorization call',
type: 'string',
defaultValue: '',
},
responseType: {
description: "the type of response from the authorization endpoint. can be 'token' or 'code'",
type: 'string',
defaultValue: 'code',
},
}, {
baseConfiguration: BaseInternetAccountConfig,
explicitlyTyped: true,
});
export default OAuthConfigSchema;