Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace authentication

Namespace for authentication.

Index

Functions(3)

getSession

  • 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

    Returns Thenable<AuthenticationSession>

    A thenable that resolves to an authentication session

  • 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

    Returns Thenable<AuthenticationSession>

    A thenable that resolves to an authentication session

  • 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

    Returns Thenable<AuthenticationSession | undefined>

    A thenable that resolves to an authentication session if available, or undefined if there are no sessions

Const onDidChangeSessions

registerAuthenticationProvider

  • 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.

    • Optional options: AuthenticationProviderOptions

      Additional options for the provider.

    Returns Disposable

    A Disposable that unregisters this provider when being disposed.

Generated by TypeDoc. Maintained by 紫升

Links: 搜外友链, 69中文网