@geogirafe/lib-geoportal
Version:
GeoGirafe is a flexible application to build online geoportals.
29 lines (28 loc) • 1.2 kB
TypeScript
import IGirafeContext from '../context/icontext.js';
export default abstract class AbstractConnectManager {
private readonly storagePath;
protected readonly context: IGirafeContext;
constructor(context: IGirafeContext);
protected get state(): import("../main.js").State;
abstract initialize(): Promise<void>;
abstract login(): Promise<void>;
abstract silentLogin(): Promise<void>;
abstract logout(): Promise<void>;
protected loggedOutFromBackend(): void;
handleErrorFromIssuer(): void;
handleUnknownError(error: Error): void;
protected loggedOut(): void;
/**
* The RedirectUrl has to be the same for all call to the issuer
* Because the authentication is given for a specific redirectUrl.
* Therefore, we keep it in localStorage.
*/
protected get redirectUrl(): string;
protected set redirectUrl(value: string);
protected getLoginRedirectUrl(silent: boolean): string;
protected getLogoutRedirectUrl(): string;
protected loadFromLocalStorage(path: string): unknown;
protected saveToLocalStorage(path: string, value: string): void;
protected resetUrl(): void;
finalizeLoginWorkflow(): void;
}