/** * An abstract class for AuthProvider APIs. * Examples of AuthProvider APIs are: google, microsoft, mail. */ import { LocalStorageAuthObject } from "../types/other"; declare abstract class AuthProvider { static access_token: string | null; static id_token: string | null; static refresh_token: string | null; static expiry_date: number | null; static SESSION_LOCAL_STORAGE_KEY: string; /** * Login to the API. */ abstract login(email?: string, pw?: string): Promise; /** * Logout from the API. */ abstract logout(): Promise; /** * Check if a session exists. */ abstract checkSessionExists(): Promise; /** * Gets the user profile after connection. */ abstract getUserProfileAfterConnection(): Promise; /** * Clears the session */ abstract clearSession(): void; /** * Gets auth object from local storage */ abstract getAuthObjectFromLocalStorage(): LocalStorageAuthObject | null; } export default AuthProvider;