import { AuthResult } from './authResult'; import { IdentityEventManager } from './identityEventManager'; import { ErrorResponse } from './models'; export type UrlParser = { /** * Check if the URL fragment contains an authentication response (either success with parameters like `id_token` * or `access_token`, or error with parameters like `error`) * * If a response is detected, trigger the corresponding event. * * @returns `true` if a response is detected */ checkUrlFragment(url: string): boolean; /** * Parse the URL fragment, and return the corresponding authentication response if exists. */ parseUrlFragment(url?: string): AuthResult | ErrorResponse | undefined; }; export default function createUrlParser(eventManager: IdentityEventManager): UrlParser;