TokenEntryInternetAccount
Auto-generated from the @jbrowse/mobx-state-tree model in the source. See the developer guide for concepts. Provided by the authentication plugin. View source.
Shared base for internet accounts whose token the user supplies through a
dialog (HTTP Basic, external token). Such accounts differ in their type,
which also names the model, and the dialog form that collects the token,
both passed here. The base is not registered itself; see HTTPBasicInternetAccount
and ExternalTokenInternetAccount.
Properties
| Member | Description |
|---|---|
typeSTNValue<Type, ILiteralType<Type>> |
The registered name of the concrete type, which a snapshot selects it by. |
| configuration |
The config node this model reads its settings from, through getConf. |
Getters
| Member | Description |
|---|---|
validateWithHEADboolean |
validate the token with a HEAD request before it is used |
Actions
| Member | Description |
|---|---|
| getTokenFromUser |
Prompt the user for a token via the account's dialog form, resolving with the entered token or rejecting if the user cancels. |
validateToken(token: string, location: UriLocation) => Promise<string> |
Optionally validate the token with a HEAD request before use, per the validateWithHEAD config slot. Only a 401 drops the token: there is nothing to renew it with, so the next read re-opens the dialog. |