DropboxOAuthInternetAccount
Auto-generated @jbrowse/mobx-state-tree API for the current JBrowse release —
see pluggable elements for concepts. Provided by the
authentication plugin.
View source.
The configuration slots for this model are documented on its config schema page.
Members a composed model contributes are listed here too, so these tables are the whole surface.
Properties
| Member | Description |
|---|---|
typetype: types.literal('DropboxOAuthInternetAccount') | |
configurationconfiguration: ConfigurationReference(configSchema) |
Getters
| Member | Description | Defined by |
|---|---|---|
toggleContentsElement | The FileSelector icon for Dropbox | DropboxOAuthInternetAccount |
selectorLabelstring | DropboxOAuthInternetAccount | |
authFlowParams{ token_access_type: string; } | Dropbox issues a refresh token only when the authorization request asks for offline access, and spells that token_access_type where other providers use access_type — so it belongs here rather than on every OAuth account. | DropboxOAuthInternetAccount |
| conf | The config typed off the concrete schema. ConfigurationReference erases self.configuration to any (the reference's MST instance brand doesn't carry the schema's slot definitions), so reads go through this getter to recover per-slot types and slot-name validation. | OAuthInternetAccount |
authEndpointstring | OAuthInternetAccount | |
tokenEndpointstring | OAuthInternetAccount | |
needsPKCEboolean | OAuthInternetAccount | |
clientIdstring | OAuthInternetAccount | |
scopesstring | OAuthInternetAccount | |
statestring | OAuth state parameter: https://www.rfc-editor.org/rfc/rfc6749#section-4.1.1 Can override or extend if dynamic state is needed. | OAuthInternetAccount |
responseType"code" | "token" | OAuthInternetAccount | |
refreshTokenKeystring | OAuthInternetAccount |
Methods
| Member | Description | Defined by |
|---|---|---|
| getFetcher | DropboxOAuthInternetAccount | |
retrieveRefreshToken() => string | undefined | OAuthInternetAccount |
Actions
| Member | Description | Defined by |
|---|---|---|
validateToken(token: string, location: UriLocation) => Promise<string> | DropboxOAuthInternetAccount | |
storeRefreshToken(refreshToken: string) => void | OAuthInternetAccount | |
removeRefreshToken() => void | OAuthInternetAccount | |
| postTokenGrant | POST a grant to the token endpoint and read the access token out of the answer. Both grants this account makes — trading the authorization code on the way in, trading the refresh token when the access token expires — are the same form-encoded request to the same endpoint answered by the same body, and OAuth 2 says so (RFC 6749 §4.1.3, §6). They differ in the grant's own parameters and in what a failure means, which is what stays at the call sites. | OAuthInternetAccount |
| OAuthInternetAccount | ||
exchangeRefreshForAccessToken(refreshToken: string) => Promise<string> | OAuthInternetAccount | |
| validateTokenWithProbe | Prove a token against the resource and, if that fails, refresh it once and prove the new one. Returns whichever token worked; throws if neither does. Every OAuth account validates this way and they differ only in what a probe is — a HEAD of the resource here, a metadata call for Dropbox and Google Drive. | OAuthInternetAccount |
getTokenViaAuthFlow() => Promise<string> | Opens the provider's auth page and returns a promise for the resulting token. For Electron, drives the flow directly via IPC; for web, opens a popup and waits for the redirect message. | OAuthInternetAccount |
| getTokenFromUser | OAuthInternetAccount |