import * as vscode from 'vscode'; export declare enum OidcGrantTypes { password = "password", code = "code", token = "token" } export declare class OidcProviderConfiguration { readonly name: string; readonly idpBaseUrl: vscode.Uri; readonly redirectUrl: vscode.Uri; readonly clientId: string; readonly clientSecret: string | undefined; readonly scopes: string; readonly grantType: OidcGrantTypes; constructor(name: string, idpBaseUrl: vscode.Uri, redirectUrl: vscode.Uri, clientId: string, clientSecret: string | undefined, scopes: string, grantType?: OidcGrantTypes); } export declare class OidcCredentials { readonly providerName: string; readonly idToken: string | undefined; readonly accessToken: string; readonly refreshToken: string; readonly authTokensExpiration: number; readonly refreshTokenExpiration: number; readonly readableIdToken: any | undefined; readonly readableAccessToken: any; get authTokensExpired(): boolean; get refreshTokenExpired(): boolean; constructor(providerName: string, idToken: string | undefined, accessToken: string, refreshToken: string, authTokensExpiration: number, refreshTokenExpiration: number); serialize(): any; static deserialize(descriptor: any): OidcCredentials; } export declare class AuthUserDescriptor implements vscode.AuthenticationSession, vscode.AuthenticationSessionAccountInformation { readonly oidcCredentials: OidcCredentials; readonly username: string; readonly id: string; readonly accessToken: string; readonly scopes: Array; readonly label: string; readonly account: vscode.AuthenticationSessionAccountInformation; get expired(): boolean; constructor(oidcCredentials: OidcCredentials); serialize(): any; static deserialize(descriptor: any): AuthUserDescriptor; } /** * @class * @implements {vscode.AuthenticationProvider} * @description Authorizer allows user authentication OIDC protocol based on vscode platform. Singleton instance can be used across vscode extensions. No multiple user sessions are supported */ export declare class Authorizer implements vscode.AuthenticationProvider { readonly namspaceApp: string; readonly oidcProviderConfs: Array; private logger; private currentUsers; private _onDidChangeSessions; private constructor(); onDidChangeSessions: vscode.Event; getSessions(scopes?: string[]): Promise; createSession(scopes: string[]): Promise; removeSession(sessionId: string): Promise; /** * @static @method createInstance * * @description Register a singleton Authorizer instance for specified namespace if it doesn't exist * @param namespaceApp Application namespace for the authorizer * @param oidcProviderConf OIDC provider parameters */ static createInstance(namespaceApp: string, oidcProviderConfs: Array): Authorizer; private login; private refresh; private logout; }