UNPKG

@azure/msal-browser

Version:
46 lines (45 loc) 1.5 kB
import { INetworkModule } from "@azure/msal-common"; /** * Utility class for browser specific functions */ export declare class BrowserUtils { /** * Used to redirect the browser to the STS authorization endpoint * @param {string} urlNavigate - URL of the authorization endpoint * @param {boolean} noHistory - boolean flag, uses .replace() instead of .assign() if true */ static navigateWindow(urlNavigate: string, noHistory?: boolean): void; /** * Clears hash from window url. */ static clearHash(): void; /** * Replaces current hash with hash from provided url */ static replaceHash(url: string): void; /** * Returns boolean of whether the current window is in an iframe or not. */ static isInIframe(): boolean; /** * Returns current window URL as redirect uri */ static getCurrentUri(): string; /** * Gets the homepage url for the current window location. */ static getHomepage(): string; /** * Returns best compatible network client object. */ static getBrowserNetworkClient(): INetworkModule; /** * Throws error if we have completed an auth and are * attempting another auth request inside an iframe. */ static blockReloadInHiddenIframes(): void; /** * Returns boolean of whether current browser is an Internet Explorer or Edge browser. */ static detectIEOrEdge(): boolean; }