UNPKG

@geogirafe/lib-geoportal

Version:

GeoGirafe is a flexible application to build online geoportals.

52 lines (51 loc) 1.8 kB
import AbstractConnectManager from './abstractconnectmanager'; export default class OpenIdConnectManager extends AbstractConnectManager { private authorizationServer?; private readonly storagePath; private silentLoginIframe?; private get issuerConfig(); private authProcessed; private isAuthentified; private hasAuthError; initialize(): Promise<void>; /** * Code verifier for Authorization Code Grant with Proof Key for Code Exchange (PKCE) * It has to be the same when coming back from the issuer after a redirect * Therefore, we keep it in localStorage. */ get codeVerifier(): string; set codeVerifier(value: string); /** * 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. */ get redirectUrl(): string; set redirectUrl(value: string); /** * The currentState cannot just be passed as parameter in the URL * Because the URL-length is limited. * Therefore, we keep it in localStorage. */ get currentState(): string; set currentState(value: string); private loadFromLocalStorage; private saveToLocalStorage; private getAuthorizationServer; private getAuthorizationUrl; private getClient; login(): Promise<void>; silentLogin(): Promise<void>; logout(): Promise<void>; private getLoginRedirectUrl; private getLogoutRedirectUrl; private silentLoginViaIframe; private handleSilentLoggedInViaIframe; private redirectToIssuerLogin; private handleLoggedInToIssuer; private setToken; private resetUrlHistory; private refreshToken; private manageError; logoutFromIssuer(): Promise<void>; }