@jbrowse/plugin-authentication
Version:
JBrowse 2 Authentication
1,027 lines (1,026 loc) • 45.4 kB
TypeScript
import Plugin from '@jbrowse/core/Plugin';
import { modelFactory as GoogleDriveOAuthInternetAccountModelFactory } from './GoogleDriveOAuthModel/index.ts';
import type PluginManager from '@jbrowse/core/PluginManager';
export default class AuthenticationPlugin extends Plugin {
name: string;
exports: {
OAuthConfigSchema: import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
tokenType: {
description: string;
type: string;
defaultValue: string;
};
authEndpoint: {
description: string;
type: string;
defaultValue: string;
};
tokenEndpoint: {
description: string;
type: string;
defaultValue: string;
};
needsPKCE: {
description: string;
type: string;
defaultValue: boolean;
};
clientId: {
description: string;
type: string;
defaultValue: string;
};
scopes: {
description: string;
type: string;
defaultValue: string;
};
state: {
description: string;
type: string;
defaultValue: string;
};
responseType: {
description: string;
type: string;
defaultValue: string;
};
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
name: {
description: string;
type: string;
defaultValue: string;
};
description: {
description: string;
type: string;
defaultValue: string;
};
authHeader: {
description: string;
type: string;
defaultValue: string;
};
tokenType: {
description: string;
type: string;
defaultValue: string;
};
domains: {
description: string;
type: string;
defaultValue: never[];
};
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<undefined, "internetAccountId">>, undefined>>;
OAuthInternetAccountModelFactory: (configSchema: import("./OAuthModel/configSchema.ts").OAuthInternetAccountConfigModel) => import("@jbrowse/mobx-state-tree").IModelType<{
id: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
type: import("@jbrowse/mobx-state-tree").ISimpleType<string>;
configuration: import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
name: {
description: string;
type: string;
defaultValue: string;
};
description: {
description: string;
type: string;
defaultValue: string;
};
authHeader: {
description: string;
type: string;
defaultValue: string;
};
tokenType: {
description: string;
type: string;
defaultValue: string;
};
domains: {
description: string;
type: string;
defaultValue: never[];
};
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<undefined, "internetAccountId">>;
} & {
type: import("@jbrowse/mobx-state-tree").ISimpleType<"OAuthInternetAccount">;
configuration: import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
tokenType: {
description: string;
type: string;
defaultValue: string;
};
authEndpoint: {
description: string;
type: string;
defaultValue: string;
};
tokenEndpoint: {
description: string;
type: string;
defaultValue: string;
};
needsPKCE: {
description: string;
type: string;
defaultValue: boolean;
};
clientId: {
description: string;
type: string;
defaultValue: string;
};
scopes: {
description: string;
type: string;
defaultValue: string;
};
state: {
description: string;
type: string;
defaultValue: string;
};
responseType: {
description: string;
type: string;
defaultValue: string;
};
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
name: {
description: string;
type: string;
defaultValue: string;
};
description: {
description: string;
type: string;
defaultValue: string;
};
authHeader: {
description: string;
type: string;
defaultValue: string;
};
tokenType: {
description: string;
type: string;
defaultValue: string;
};
domains: {
description: string;
type: string;
defaultValue: never[];
};
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<undefined, "internetAccountId">>, undefined>>;
}, {
readonly name: string;
readonly description: string;
readonly internetAccountId: string;
readonly authHeader: string;
readonly tokenType: string;
readonly domains: string[];
readonly toggleContents: React.ReactNode;
readonly SelectorComponent: import("@jbrowse/core/util").AnyReactComponentType | undefined;
readonly selectorLabel: string | undefined;
} & {
handlesLocation(location: import("@jbrowse/core/util").UriLocation): boolean;
readonly tokenKey: string;
} & {
getTokenFromUser(_resolve: (token: string) => void, _reject: (error: Error) => void): void;
storeToken(token: string): void;
removeToken(): void;
retrieveToken(): string | null;
validateToken(token: string, _loc: import("@jbrowse/core/util").UriLocation): Promise<string>;
} & {
getToken(location?: import("@jbrowse/core/util").UriLocation): Promise<string>;
} & {
addAuthHeaderToInit(init?: RequestInit, token?: string): {
headers: Headers;
body?: BodyInit | null;
cache?: RequestCache;
credentials?: RequestCredentials;
integrity?: string;
keepalive?: boolean;
method?: string;
mode?: RequestMode;
priority?: RequestPriority;
redirect?: RequestRedirect;
referrer?: string;
referrerPolicy?: ReferrerPolicy;
signal?: AbortSignal | null;
window?: null;
};
getPreAuthorizationInformation(location: import("@jbrowse/core/util").UriLocation): Promise<{
internetAccountType: string;
authInfo: {
token: string;
configuration: any;
};
}>;
} & {
getFetcher(loc?: import("@jbrowse/core/util").UriLocation): (input: RequestInfo, init?: RequestInit) => Promise<Response>;
} & {
openLocation(location: import("@jbrowse/core/util").UriLocation): import("@jbrowse/core/util/io").RemoteFileWithRangeCache;
} & {
readonly codeVerifierPKCE: string;
} & {
readonly authEndpoint: string;
readonly tokenEndpoint: string;
readonly needsPKCE: boolean;
readonly clientId: string;
readonly scopes: string;
state(): string | undefined;
readonly responseType: "token" | "code";
readonly refreshTokenKey: string;
} & {
storeRefreshToken(refreshToken: string): void;
removeRefreshToken(): void;
retrieveRefreshToken(): string | null;
exchangeAuthorizationForAccessToken(token: string, redirectUri: string): Promise<string>;
exchangeRefreshForAccessToken(refreshToken: string): Promise<string>;
} & {
addMessageChannel(resolve: (token: string) => void, reject: (error: Error) => void): void;
deleteMessageChannel(): void;
finishOAuthWindow(event: MessageEvent, resolve: (token: string) => void, reject: (error: Error) => void): Promise<void>;
useEndpointForAuthorization(resolve: (token: string) => void, reject: (error: Error) => void): Promise<void>;
getTokenFromUser(resolve: (token: string) => void, reject: (error: Error) => void): Promise<void>;
validateToken(token: string, location: import("@jbrowse/core/util").UriLocation): Promise<string>;
} & {
getFetcher(loc?: import("@jbrowse/core/util").UriLocation): (input: RequestInfo, init?: RequestInit) => Promise<Response>;
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>;
ExternalTokenConfigSchema: import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
validateWithHEAD: {
description: string;
type: string;
defaultValue: boolean;
};
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
name: {
description: string;
type: string;
defaultValue: string;
};
description: {
description: string;
type: string;
defaultValue: string;
};
authHeader: {
description: string;
type: string;
defaultValue: string;
};
tokenType: {
description: string;
type: string;
defaultValue: string;
};
domains: {
description: string;
type: string;
defaultValue: never[];
};
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<undefined, "internetAccountId">>, undefined>>;
ExternalTokenInternetAccountModelFactory: (configSchema: import("./ExternalTokenModel/configSchema.ts").ExternalTokenInternetAccountConfigModel) => import("@jbrowse/mobx-state-tree").IModelType<{
id: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
type: import("@jbrowse/mobx-state-tree").ISimpleType<string>;
configuration: import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
name: {
description: string;
type: string;
defaultValue: string;
};
description: {
description: string;
type: string;
defaultValue: string;
};
authHeader: {
description: string;
type: string;
defaultValue: string;
};
tokenType: {
description: string;
type: string;
defaultValue: string;
};
domains: {
description: string;
type: string;
defaultValue: never[];
};
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<undefined, "internetAccountId">>;
} & {
type: import("@jbrowse/mobx-state-tree").ISimpleType<"ExternalTokenInternetAccount">;
configuration: import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
validateWithHEAD: {
description: string;
type: string;
defaultValue: boolean;
};
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
name: {
description: string;
type: string;
defaultValue: string;
};
description: {
description: string;
type: string;
defaultValue: string;
};
authHeader: {
description: string;
type: string;
defaultValue: string;
};
tokenType: {
description: string;
type: string;
defaultValue: string;
};
domains: {
description: string;
type: string;
defaultValue: never[];
};
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<undefined, "internetAccountId">>, undefined>>;
}, {
readonly name: string;
readonly description: string;
readonly internetAccountId: string;
readonly authHeader: string;
readonly tokenType: string;
readonly domains: string[];
readonly toggleContents: React.ReactNode;
readonly SelectorComponent: import("@jbrowse/core/util").AnyReactComponentType | undefined;
readonly selectorLabel: string | undefined;
} & {
handlesLocation(location: import("@jbrowse/core/util").UriLocation): boolean;
readonly tokenKey: string;
} & {
getTokenFromUser(_resolve: (token: string) => void, _reject: (error: Error) => void): void;
storeToken(token: string): void;
removeToken(): void;
retrieveToken(): string | null;
validateToken(token: string, _loc: import("@jbrowse/core/util").UriLocation): Promise<string>;
} & {
getToken(location?: import("@jbrowse/core/util").UriLocation): Promise<string>;
} & {
addAuthHeaderToInit(init?: RequestInit, token?: string): {
headers: Headers;
body?: BodyInit | null;
cache?: RequestCache;
credentials?: RequestCredentials;
integrity?: string;
keepalive?: boolean;
method?: string;
mode?: RequestMode;
priority?: RequestPriority;
redirect?: RequestRedirect;
referrer?: string;
referrerPolicy?: ReferrerPolicy;
signal?: AbortSignal | null;
window?: null;
};
getPreAuthorizationInformation(location: import("@jbrowse/core/util").UriLocation): Promise<{
internetAccountType: string;
authInfo: {
token: string;
configuration: any;
};
}>;
} & {
getFetcher(loc?: import("@jbrowse/core/util").UriLocation): (input: RequestInfo, init?: RequestInit) => Promise<Response>;
} & {
openLocation(location: import("@jbrowse/core/util").UriLocation): import("@jbrowse/core/util/io").RemoteFileWithRangeCache;
} & {
readonly validateWithHEAD: boolean;
} & {
getTokenFromUser(resolve: (token: string) => void, reject: (error: Error) => void): void;
validateToken(token: string, location: import("@jbrowse/core/util").UriLocation): Promise<string>;
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>;
HTTPBasicConfigSchema: import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
tokenType: {
description: string;
type: string;
defaultValue: string;
};
validateWithHEAD: {
description: string;
type: string;
defaultValue: boolean;
};
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
name: {
description: string;
type: string;
defaultValue: string;
};
description: {
description: string;
type: string;
defaultValue: string;
};
authHeader: {
description: string;
type: string;
defaultValue: string;
};
tokenType: {
description: string;
type: string;
defaultValue: string;
};
domains: {
description: string;
type: string;
defaultValue: never[];
};
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<undefined, "internetAccountId">>, undefined>>;
HTTPBasicInternetAccountModelFactory: (configSchema: import("./HTTPBasicModel/configSchema.ts").HTTPBasicInternetAccountConfigModel) => import("@jbrowse/mobx-state-tree").IModelType<{
id: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
type: import("@jbrowse/mobx-state-tree").ISimpleType<string>;
configuration: import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
name: {
description: string;
type: string;
defaultValue: string;
};
description: {
description: string;
type: string;
defaultValue: string;
};
authHeader: {
description: string;
type: string;
defaultValue: string;
};
tokenType: {
description: string;
type: string;
defaultValue: string;
};
domains: {
description: string;
type: string;
defaultValue: never[];
};
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<undefined, "internetAccountId">>;
} & {
type: import("@jbrowse/mobx-state-tree").ISimpleType<"HTTPBasicInternetAccount">;
configuration: import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
tokenType: {
description: string;
type: string;
defaultValue: string;
};
validateWithHEAD: {
description: string;
type: string;
defaultValue: boolean;
};
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
name: {
description: string;
type: string;
defaultValue: string;
};
description: {
description: string;
type: string;
defaultValue: string;
};
authHeader: {
description: string;
type: string;
defaultValue: string;
};
tokenType: {
description: string;
type: string;
defaultValue: string;
};
domains: {
description: string;
type: string;
defaultValue: never[];
};
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<undefined, "internetAccountId">>, undefined>>;
}, {
readonly name: string;
readonly description: string;
readonly internetAccountId: string;
readonly authHeader: string;
readonly tokenType: string;
readonly domains: string[];
readonly toggleContents: React.ReactNode;
readonly SelectorComponent: import("@jbrowse/core/util").AnyReactComponentType | undefined;
readonly selectorLabel: string | undefined;
} & {
handlesLocation(location: import("@jbrowse/core/util").UriLocation): boolean;
readonly tokenKey: string;
} & {
getTokenFromUser(_resolve: (token: string) => void, _reject: (error: Error) => void): void;
storeToken(token: string): void;
removeToken(): void;
retrieveToken(): string | null;
validateToken(token: string, _loc: import("@jbrowse/core/util").UriLocation): Promise<string>;
} & {
getToken(location?: import("@jbrowse/core/util").UriLocation): Promise<string>;
} & {
addAuthHeaderToInit(init?: RequestInit, token?: string): {
headers: Headers;
body?: BodyInit | null;
cache?: RequestCache;
credentials?: RequestCredentials;
integrity?: string;
keepalive?: boolean;
method?: string;
mode?: RequestMode;
priority?: RequestPriority;
redirect?: RequestRedirect;
referrer?: string;
referrerPolicy?: ReferrerPolicy;
signal?: AbortSignal | null;
window?: null;
};
getPreAuthorizationInformation(location: import("@jbrowse/core/util").UriLocation): Promise<{
internetAccountType: string;
authInfo: {
token: string;
configuration: any;
};
}>;
} & {
getFetcher(loc?: import("@jbrowse/core/util").UriLocation): (input: RequestInfo, init?: RequestInit) => Promise<Response>;
} & {
openLocation(location: import("@jbrowse/core/util").UriLocation): import("@jbrowse/core/util/io").RemoteFileWithRangeCache;
} & {
readonly validateWithHEAD: boolean;
} & {
getTokenFromUser(resolve: (token: string) => void, reject: (error: Error) => void): void;
validateToken(token: string, location: import("@jbrowse/core/util").UriLocation): Promise<string>;
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>;
DropboxOAuthConfigSchema: import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
authEndpoint: {
description: string;
type: string;
defaultValue: string;
};
tokenEndpoint: {
description: string;
type: string;
defaultValue: string;
};
needsPKCE: {
description: string;
type: string;
defaultValue: boolean;
};
domains: {
description: string;
type: string;
defaultValue: string[];
};
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
tokenType: {
description: string;
type: string;
defaultValue: string;
};
authEndpoint: {
description: string;
type: string;
defaultValue: string;
};
tokenEndpoint: {
description: string;
type: string;
defaultValue: string;
};
needsPKCE: {
description: string;
type: string;
defaultValue: boolean;
};
clientId: {
description: string;
type: string;
defaultValue: string;
};
scopes: {
description: string;
type: string;
defaultValue: string;
};
state: {
description: string;
type: string;
defaultValue: string;
};
responseType: {
description: string;
type: string;
defaultValue: string;
};
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
name: {
description: string;
type: string;
defaultValue: string;
};
description: {
description: string;
type: string;
defaultValue: string;
};
authHeader: {
description: string;
type: string;
defaultValue: string;
};
tokenType: {
description: string;
type: string;
defaultValue: string;
};
domains: {
description: string;
type: string;
defaultValue: never[];
};
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<undefined, "internetAccountId">>, undefined>>, undefined>>;
DropboxOAuthInternetAccountModelFactory: (configSchema: import("./DropboxOAuthModel/configSchema.ts").DropboxOAuthInternetAccountConfigModel) => import("@jbrowse/mobx-state-tree").IModelType<{
id: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
type: import("@jbrowse/mobx-state-tree").ISimpleType<string>;
configuration: import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
name: {
description: string;
type: string;
defaultValue: string;
};
description: {
description: string;
type: string;
defaultValue: string;
};
authHeader: {
description: string;
type: string;
defaultValue: string;
};
tokenType: {
description: string;
type: string;
defaultValue: string;
};
domains: {
description: string;
type: string;
defaultValue: never[];
};
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<undefined, "internetAccountId">>;
} & {
type: import("@jbrowse/mobx-state-tree").ISimpleType<"OAuthInternetAccount">;
configuration: import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
tokenType: {
description: string;
type: string;
defaultValue: string;
};
authEndpoint: {
description: string;
type: string;
defaultValue: string;
};
tokenEndpoint: {
description: string;
type: string;
defaultValue: string;
};
needsPKCE: {
description: string;
type: string;
defaultValue: boolean;
};
clientId: {
description: string;
type: string;
defaultValue: string;
};
scopes: {
description: string;
type: string;
defaultValue: string;
};
state: {
description: string;
type: string;
defaultValue: string;
};
responseType: {
description: string;
type: string;
defaultValue: string;
};
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
name: {
description: string;
type: string;
defaultValue: string;
};
description: {
description: string;
type: string;
defaultValue: string;
};
authHeader: {
description: string;
type: string;
defaultValue: string;
};
tokenType: {
description: string;
type: string;
defaultValue: string;
};
domains: {
description: string;
type: string;
defaultValue: never[];
};
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<undefined, "internetAccountId">>, undefined>>;
} & {
type: import("@jbrowse/mobx-state-tree").ISimpleType<"DropboxOAuthInternetAccount">;
configuration: import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
authEndpoint: {
description: string;
type: string;
defaultValue: string;
};
tokenEndpoint: {
description: string;
type: string;
defaultValue: string;
};
needsPKCE: {
description: string;
type: string;
defaultValue: boolean;
};
domains: {
description: string;
type: string;
defaultValue: string[];
};
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
tokenType: {
description: string;
type: string;
defaultValue: string;
};
authEndpoint: {
description: string;
type: string;
defaultValue: string;
};
tokenEndpoint: {
description: string;
type: string;
defaultValue: string;
};
needsPKCE: {
description: string;
type: string;
defaultValue: boolean;
};
clientId: {
description: string;
type: string;
defaultValue: string;
};
scopes: {
description: string;
type: string;
defaultValue: string;
};
state: {
description: string;
type: string;
defaultValue: string;
};
responseType: {
description: string;
type: string;
defaultValue: string;
};
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
name: {
description: string;
type: string;
defaultValue: string;
};
description: {
description: string;
type: string;
defaultValue: string;
};
authHeader: {
description: string;
type: string;
defaultValue: string;
};
tokenType: {
description: string;
type: string;
defaultValue: string;
};
domains: {
description: string;
type: string;
defaultValue: never[];
};
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<undefined, "internetAccountId">>, undefined>>, undefined>>;
}, {
readonly name: string;
readonly description: string;
readonly internetAccountId: string;
readonly authHeader: string;
readonly tokenType: string;
readonly domains: string[];
readonly toggleContents: React.ReactNode;
readonly SelectorComponent: import("@jbrowse/core/util").AnyReactComponentType | undefined;
readonly selectorLabel: string | undefined;
} & {
handlesLocation(location: import("@jbrowse/core/util").UriLocation): boolean;
readonly tokenKey: string;
} & {
getTokenFromUser(_resolve: (token: string) => void, _reject: (error: Error) => void): void;
storeToken(token: string): void;
removeToken(): void;
retrieveToken(): string | null;
validateToken(token: string, _loc: import("@jbrowse/core/util").UriLocation): Promise<string>;
} & {
getToken(location?: import("@jbrowse/core/util").UriLocation): Promise<string>;
} & {
addAuthHeaderToInit(init?: RequestInit, token?: string): {
headers: Headers;
body?: BodyInit | null;
cache?: RequestCache;
credentials?: RequestCredentials;
integrity?: string;
keepalive?: boolean;
method?: string;
mode?: RequestMode;
priority?: RequestPriority;
redirect?: RequestRedirect;
referrer?: string;
referrerPolicy?: ReferrerPolicy;
signal?: AbortSignal | null;
window?: null;
};
getPreAuthorizationInformation(location: import("@jbrowse/core/util").UriLocation): Promise<{
internetAccountType: string;
authInfo: {
token: string;
configuration: any;
};
}>;
} & {
getFetcher(loc?: import("@jbrowse/core/util").UriLocation): (input: RequestInfo, init?: RequestInit) => Promise<Response>;
} & {
openLocation(location: import("@jbrowse/core/util").UriLocation): import("@jbrowse/core/util/io").RemoteFileWithRangeCache;
} & {
readonly codeVerifierPKCE: string;
} & {
readonly authEndpoint: string;
readonly tokenEndpoint: string;
readonly needsPKCE: boolean;
readonly clientId: string;
readonly scopes: string;
state(): string | undefined;
readonly responseType: "token" | "code";
readonly refreshTokenKey: string;
} & {
storeRefreshToken(refreshToken: string): void;
removeRefreshToken(): void;
retrieveRefreshToken(): string | null;
exchangeAuthorizationForAccessToken(token: string, redirectUri: string): Promise<string>;
exchangeRefreshForAccessToken(refreshToken: string): Promise<string>;
} & {
addMessageChannel(resolve: (token: string) => void, reject: (error: Error) => void): void;
deleteMessageChannel(): void;
finishOAuthWindow(event: MessageEvent, resolve: (token: string) => void, reject: (error: Error) => void): Promise<void>;
useEndpointForAuthorization(resolve: (token: string) => void, reject: (error: Error) => void): Promise<void>;
getTokenFromUser(resolve: (token: string) => void, reject: (error: Error) => void): Promise<void>;
validateToken(token: string, location: import("@jbrowse/core/util").UriLocation): Promise<string>;
} & {
getFetcher(loc?: import("@jbrowse/core/util").UriLocation): (input: RequestInfo, init?: RequestInit) => Promise<Response>;
} & {
readonly toggleContents: import("react/jsx-runtime").JSX.Element;
readonly selectorLabel: string;
} & {
getFetcher(location?: import("@jbrowse/core/util").UriLocation): (input: RequestInfo, init?: RequestInit) => Promise<Response>;
validateToken(token: string, location: import("@jbrowse/core/util").UriLocation): Promise<string>;
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>;
GoogleDriveOAuthConfigSchema: import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
authEndpoint: {
description: string;
type: string;
defaultValue: string;
};
scopes: {
description: string;
type: string;
defaultValue: string;
};
domains: {
description: string;
type: string;
defaultValue: string[];
};
responseType: {
description: string;
type: string;
defaultValue: string;
};
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
tokenType: {
description: string;
type: string;
defaultValue: string;
};
authEndpoint: {
description: string;
type: string;
defaultValue: string;
};
tokenEndpoint: {
description: string;
type: string;
defaultValue: string;
};
needsPKCE: {
description: string;
type: string;
defaultValue: boolean;
};
clientId: {
description: string;
type: string;
defaultValue: string;
};
scopes: {
description: string;
type: string;
defaultValue: string;
};
state: {
description: string;
type: string;
defaultValue: string;
};
responseType: {
description: string;
type: string;
defaultValue: string;
};
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaType<{
name: {
description: string;
type: string;
defaultValue: string;
};
description: {
description: string;
type: string;
defaultValue: string;
};
authHeader: {
description: string;
type: string;
defaultValue: string;
};
tokenType: {
description: string;
type: string;
defaultValue: string;
};
domains: {
description: string;
type: string;
defaultValue: never[];
};
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema.ts").ConfigurationSchemaOptions<undefined, "internetAccountId">>, undefined>>, undefined>>;
GoogleDriveOAuthInternetAccountModelFactory: typeof GoogleDriveOAuthInternetAccountModelFactory;
};
install(pluginManager: PluginManager): void;
}
export { configSchema as OAuthConfigSchema, modelFactory as OAuthInternetAccountModelFactory, } from './OAuthModel/index.ts';
export { configSchema as ExternalTokenConfigSchema, modelFactory as ExternalTokenInternetAccountModelFactory, } from './ExternalTokenModel/index.ts';
export { configSchema as HTTPBasicConfigSchema, modelFactory as HTTPBasicInternetAccountModelFactory, } from './HTTPBasicModel/index.ts';
export { configSchema as DropboxOAuthConfigSchema, modelFactory as DropboxOAuthInternetAccountModelFactory, } from './DropboxOAuthModel/index.ts';
export { configSchema as GoogleDriveOAuthConfigSchema, modelFactory as GoogleDriveOAuthInternetAccountModelFactory, } from './GoogleDriveOAuthModel/index.ts';