import { type AxiosAuthenticationTokenManagerOptions, type UserToken } from '@farfetch/blackout-client'; import React from 'react'; export declare enum CallbackNames { OnUserSessionTerminated = "onUserSessionTerminated" } interface Props extends AxiosAuthenticationTokenManagerOptions { baseURL: string; children: React.ReactNode; headers: { [k: string]: string; }; callbacks: { onUserSessionTerminated: (expiredUserToken: UserToken | null) => void; }; storage: AxiosAuthenticationTokenManagerOptions['storage']; } /** * Provides support for transparent authentication to apps with access tokens by * installing an interceptor on the default \@farfetch/blackout-client axios * instance used by all clients. It also provides functions to login/logout a user * through the useAuthentication hook that must be called in order for the * interceptor to know when to use guest/authenticated user tokens for subsequent * requests. See the options below for more information on how you can configure * this provider. * * @example Adding the AuthenticationProvider to your app * ``` * * import \{ AuthenticationProvider \} from '\@farfetch/blackout-react/authentication/contexts'; * * const App = () =\> \{ * return (); * \} * ``` * * @param props - Props to configure AuthenticationProvider. * * @returns The authentication context provider element wrapping the passed in children. */ declare function AuthenticationProvider({ baseURL, children, headers, callbacks, ...tokenManagerOptions }: Props): JSX.Element; export default AuthenticationProvider;