A provider for performing authentication to a service.
A provider for performing authentication to a service.
(create-session authentication-provider scopes)
Prompts a user to login.
If login is successful, the onDidChangeSessions event should be fired.
If login fails, a rejected promise should be returned.
If the provider has specified that it does not support multiple accounts, then this should never be called if there is already an existing session matching these scopes.
Parameters:
scopes
: readonly string[]
- A list of scopes, permissions, that the new session should be created with.Returns: Thenable<AuthenticationSession>
- A promise that resolves to an authentication session.
Prompts a user to login. If login is successful, the onDidChangeSessions event should be fired. If login fails, a rejected promise should be returned. If the provider has specified that it does not support multiple accounts, then this should never be called if there is already an existing session matching these scopes. **Parameters:** - `scopes`: `readonly string[]` - A list of scopes, permissions, that the new session should be created with. **Returns:** `Thenable<AuthenticationSession>` - A promise that resolves to an authentication session.
(on-did-change-sessions authentication-provider)
(on-did-change-sessions authentication-provider listener)
(on-did-change-sessions authentication-provider listener this-args)
(on-did-change-sessions authentication-provider listener this-args disposables)
An {@link Event } which fires when the array of sessions has changed, or data within a session has 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 array of sessions has changed, or data within a session has 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.
(remove-session authentication-provider session-id)
Removes the session corresponding to session id.
If the removal is successful, the onDidChangeSessions event should be fired.
If a session cannot be removed, the provider should reject with an error message.
Parameters:
session-id
: string
- The id of the session to remove.Returns: Thenable<void>
Removes the session corresponding to session id. If the removal is successful, the onDidChangeSessions event should be fired. If a session cannot be removed, the provider should reject with an error message. **Parameters:** - `session-id`: `string` - The id of the session to remove. **Returns:** `Thenable<void>`
(sessions authentication-provider)
(sessions authentication-provider scopes)
Get a list of sessions.
Parameters:
scopes
: readonly string[] | undefined
- An optional list of scopes. If provided, the sessions returned should match
these permissions, otherwise all sessions should be returned.Returns: Thenable<readonly AuthenticationSession[]>
- A promise that resolves to an array of authentication sessions.
Get a list of sessions. **Parameters:** - `scopes`: `readonly string[] | undefined` - An optional list of scopes. If provided, the sessions returned should match these permissions, otherwise all sessions should be returned. **Returns:** `Thenable<readonly AuthenticationSession[]>` - A promise that resolves to an array of authentication sessions.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close