Namespace for authentication.
Namespace for authentication.
(on-did-change-sessions)
(on-did-change-sessions listener)
(on-did-change-sessions listener this-args)
(on-did-change-sessions listener this-args disposables)
An {@link Event } which fires when the authentication sessions of an authentication provider have been added, removed, or changed.
Parameters:
listener
: (e: T) => any
- The listener function will be called when the event happens.this-args
: any
- The this
-argument which will be used when calling the event listener.disposables
: Disposable[] | undefined
- An array to which a {@link Disposable } will be added.Returns: Disposable
- A disposable which unsubscribes the event listener.
An {@link Event } which fires when the authentication sessions of an authentication provider have been added, removed, or changed. **Parameters:** - `listener`: `(e: T) => any` - The listener function will be called when the event happens. - `this-args`: `any` - The `this`-argument which will be used when calling the event listener. - `disposables`: `Disposable[] | undefined` - An array to which a {@link Disposable } will be added. **Returns:** `Disposable` - A disposable which unsubscribes the event listener.
(register-authentication-provider id label provider)
(register-authentication-provider id label provider options)
Register an authentication provider.
There can only be one provider per id and an error is being thrown when an id has already been used by another provider. Ids are case-sensitive.
Parameters:
id
: string
- The unique identifier of the provider.label
: string
- The human-readable name of the provider.provider
: AuthenticationProvider
- The authentication provider provider.options
: AuthenticationProviderOptions | undefined
- Additional options for the provider.Returns: Disposable
- A {@link Disposable} that unregisters this provider when being disposed.
Register an authentication provider. There can only be one provider per id and an error is being thrown when an id has already been used by another provider. Ids are case-sensitive. **Parameters:** - `id`: `string` - The unique identifier of the provider. - `label`: `string` - The human-readable name of the provider. - `provider`: `AuthenticationProvider` - The authentication provider provider. - `options`: `AuthenticationProviderOptions | undefined` - Additional options for the provider. **Returns:** `Disposable` - A {@link Disposable} that unregisters this provider when being disposed.
(session provider-id scopes)
(session provider-id scopes options)
Get an authentication session matching the desired scopes. Rejects if a provider with providerId is not registered, or if the user does not consent to sharing authentication information with the extension. If there are multiple sessions with the same scopes, the user will be shown a quickpick to select which account they would like to use.
Currently, there are only two authentication providers that are contributed from built in extensions to the editor that implement GitHub and Microsoft authentication: their providerId's are 'github' and 'microsoft'.
Parameters:
provider-id
: string
- The id of the provider to usescopes
: readonly string[]
- A list of scopes representing the permissions requested. These are dependent on the authentication provideroptions
: AuthenticationGetSessionOptions | undefined
- The {@link AuthenticationGetSessionOptions } to useReturns: Thenable<AuthenticationSession | undefined>
- A thenable that resolves to an authentication session if available, or undefined if there are no sessions
Get an authentication session matching the desired scopes. Rejects if a provider with providerId is not registered, or if the user does not consent to sharing authentication information with the extension. If there are multiple sessions with the same scopes, the user will be shown a quickpick to select which account they would like to use. Currently, there are only two authentication providers that are contributed from built in extensions to the editor that implement GitHub and Microsoft authentication: their providerId's are 'github' and 'microsoft'. **Parameters:** - `provider-id`: `string` - The id of the provider to use - `scopes`: `readonly string[]` - A list of scopes representing the permissions requested. These are dependent on the authentication provider - `options`: `AuthenticationGetSessionOptions | undefined` - The {@link AuthenticationGetSessionOptions } to use **Returns:** `Thenable<AuthenticationSession | undefined>` - A thenable that resolves to an authentication session if available, or undefined if there are no sessions
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close