Interface AuthenticationService
interface AuthenticationService { onDidChangeSessions: Event<{ event: AuthenticationProviderAuthenticationSessionsChangeEvent; label: string; providerId: string; }>; onDidRegisterAuthenticationProvider: Event<AuthenticationProviderInformation>; onDidUnregisterAuthenticationProvider: Event<AuthenticationProviderInformation>; onDidUpdateSignInCount: Event<number>; getLabel(providerId): string; getProviderIds(): string[]; getSessions(providerId,
scopes?,
user?): Promise<readonly AuthenticationSession[]>; isAuthenticationProviderRegistered(id): boolean; login(providerId,
scopes,
options?): Promise<AuthenticationSession>; logout(providerId,
sessionId): Promise<void>; registerAuthenticationProvider(id,
provider): void; requestNewSession(id,
scopes,
extensionId,
extensionName): void; signOutOfAccount(providerId,
accountName): Promise<void>; supportsMultipleAccounts(providerId): boolean; unregisterAuthenticationProvider(id): void; updateSessions(providerId,
event): void; } Properties
Readonly
onDidChangeSessions
Type declaration
label: string
providerId: string
Readonly
onDidRegisterAuthenticationProvider
Readonly
onDidUnregisterAuthenticationProvider
Readonly
onDidUpdateSignInCount
onDidUpdateSignInCount: Event<number> Methods
getLabel
- getLabel(providerId): string
Returns string
getProviderIds
- getProviderIds(): string[]
Returns string[]
isAuthenticationProviderRegistered
- isAuthenticationProviderRegistered(id): boolean
Returns boolean
logout
- logout(providerId, sessionId): Promise<void>
Parameters
- providerId: string
- sessionId: string
Returns Promise<void>
registerAuthenticationProvider
- registerAuthenticationProvider(id, provider): void
Returns void
requestNewSession
- requestNewSession(id, scopes, extensionId, extensionName): void
Parameters
- id: string
- scopes: string[]
- extensionId: string
- extensionName: string
Returns void
signOutOfAccount
- signOutOfAccount(providerId, accountName): Promise<void>
Parameters
- providerId: string
- accountName: string
Returns Promise<void>
supportsMultipleAccounts
- supportsMultipleAccounts(providerId): boolean
Returns boolean
unregisterAuthenticationProvider
- unregisterAuthenticationProvider(id): void
Returns void
updateSessions
- updateSessions(providerId, event): void
Returns void