Datalayer VS Code Extension - v0.0.9
    Preparing search index...

    Authentication provider interface. Implementations should handle platform-specific authentication flows.

    interface IAuthProvider {
        onAuthStateChanged: Event<VSCodeAuthState>;
        getAuthState(): VSCodeAuthState;
        getCurrentUser(): UserDTO;
        getToken(): string;
        initialize(): Promise<void>;
        isAuthenticated(): boolean;
        login(): Promise<void>;
        loginWithCredentials(): Promise<void>;
        loginWithOAuth(provider: "github" | "linkedin"): Promise<void>;
        logout(): Promise<void>;
        showAuthStatus(): Promise<void>;
        showLoginMethodPicker(): Promise<AuthMethod>;
    }

    Implemented by

    Index

    Properties

    onAuthStateChanged: Event<VSCodeAuthState>

    Event fired when authentication state changes.

    Methods

    • Initializes authentication state from stored credentials. Should verify existing authentication with the platform.

      Returns Promise<void>

    • Performs user login flow. Should prompt for credentials and authenticate with platform.

      Returns Promise<void>

      Use showLoginMethodPicker() followed by specific login methods

    • Login using OAuth provider. Opens browser for OAuth flow and handles callback.

      Parameters

      • provider: "github" | "linkedin"

        OAuth provider (github or linkedin)

      Returns Promise<void>