zenstack
Version:
FullStack enhancement for Prisma ORM: seamless integration from database to UI
33 lines (32 loc) • 1.29 kB
TypeScript
import * as vscode from 'vscode';
export declare const AUTH_PROVIDER_ID = "ZenStack";
export declare const AUTH_URL = "https://accounts.zenstack.dev";
export declare const API_URL = "https://api.zenstack.dev";
export declare class ZenStackAuthenticationProvider implements vscode.AuthenticationProvider, vscode.Disposable {
private _onDidChangeSessions;
readonly onDidChangeSessions: vscode.Event<vscode.AuthenticationProviderAuthenticationSessionsChangeEvent>;
private _sessions;
private _context;
private _disposable;
private pendingAuth?;
constructor(context: vscode.ExtensionContext);
getSessions(_scopes?: readonly string[]): Promise<vscode.AuthenticationSession[]>;
createSession(scopes: readonly string[]): Promise<vscode.AuthenticationSession>;
removeSession(sessionId: string): Promise<void>;
/**
* Log out all sessions
*/
logoutAllSessions(): Promise<void>;
private performLogin;
private generateState;
handleAuthCallback(callbackUri: vscode.Uri): Promise<void>;
private createSessionFromAccessToken;
private parseJWTClaims;
private getStoredSessions;
private storeSession;
private removeStoredSession;
/**
* Dispose the registered services
*/
dispose(): Promise<void>;
}