16 lines
1 KiB
TypeScript
Executable file
16 lines
1 KiB
TypeScript
Executable file
import React, { PropsWithChildren } from "react";
|
|
import { AccountIdentifiers } from "../types/AccountIdentifiers.js";
|
|
import { MsalAuthenticationResult } from "../hooks/useMsalAuthentication.js";
|
|
import { InteractionType, PopupRequest, RedirectRequest, SsoSilentRequest } from "@azure/msal-browser";
|
|
import { IMsalContext } from "../MsalContext.js";
|
|
export type MsalAuthenticationProps = PropsWithChildren<AccountIdentifiers & {
|
|
interactionType: InteractionType;
|
|
authenticationRequest?: PopupRequest | RedirectRequest | SsoSilentRequest;
|
|
loadingComponent?: React.ElementType<IMsalContext>;
|
|
errorComponent?: React.ElementType<MsalAuthenticationResult>;
|
|
}>;
|
|
/**
|
|
* Attempts to authenticate user if not already authenticated, then renders child components
|
|
* @param props
|
|
*/
|
|
export declare function MsalAuthenticationTemplate({ interactionType, username, homeAccountId, localAccountId, authenticationRequest, loadingComponent: LoadingComponent, errorComponent: ErrorComponent, children, }: MsalAuthenticationProps): React.ReactElement | null;
|