UNPKG

@azure/msal-browser

Version:
47 lines (46 loc) 1.75 kB
import { AuthorizationCodeRequest, AuthorizationCodeClient } from "@azure/msal-common"; import { InteractionHandler } from "./InteractionHandler"; import { BrowserStorage } from "../cache/BrowserStorage"; /** * This class implements the interaction handler base class for browsers. It is written specifically for handling * popup window scenarios. It includes functions for monitoring the popup window for a hash. */ export declare class PopupHandler extends InteractionHandler { private currentWindow; constructor(authCodeModule: AuthorizationCodeClient, storageImpl: BrowserStorage); /** * Opens a popup window with given request Url. * @param requestUrl */ initiateAuthRequest(requestUrl: string, authCodeRequest: AuthorizationCodeRequest, popup?: Window | null): Window; /** * Monitors a window until it loads a url with a known hash, or hits a specified timeout. * @param popupWindow - window that is being monitored * @param timeout - milliseconds until timeout * @param urlNavigate - url that was navigated to */ monitorPopupForHash(popupWindow: Window, timeout: number): Promise<string>; /** * @hidden * * Configures popup window for login. * * @param urlNavigate * @param title * @param popUpWidth * @param popUpHeight * @ignore * @hidden */ private openPopup; static openSizedPopup(urlNavigate?: string): Window | null; /** * Event callback to unload main window. */ unloadWindow(e: Event): void; /** * Closes popup, removes any state vars created during popup calls. * @param popupWindow */ private cleanPopup; }