import { Session } from "./Session"; /** * Obtain the {@link Session} used when not explicitly instantiating one yourself. * * When using the top-level exports {@link fetch}, {@link login}, {@link logout}, * {@link handleIncomingRedirect}, {@link onLogin} and {@link onLogout}, these apply to an * implicitly-instantiated {@link Session}. * This function returns a reference to that Session in order to obtain e.g. the current user's * WebID. * @since 1.3.0 */ export declare function getDefaultSession(): Session; /** * This function's signature is equal to `window.fetch`, but if the current user is authenticated * (see [[login]] and [[handleIncomingRedirect]]), requests made using it will include that user's * credentials. If not, this will behave just like the regular `window.fetch`. * * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch} * @since 1.3.0 */ export declare const fetch: Session["fetch"]; /** * Triggers the login process. Note that this method will redirect the user away from your app. * * @param options Parameter to customize the login behaviour. In particular, two options are mandatory: `options.oidcIssuer`, the user's identity provider, and `options.redirectUrl`, the URL to which the user will be redirected after logging in their identity provider. * @returns This method should redirect the user away from the app: it does not return anything. The login process is completed by [[handleIncomingRedirect]]. * @since 1.3.0 */ export declare const login: Session["login"]; /** * Logs the user out of the application. * * By default this does not log the user out of their Solid identity provider. * In order to do so, you must set the logoutType to `idp`. For usage details * see {@link Session.logout}. * * @since 1.3.0 */ export declare const logout: Session["logout"]; /** * Completes the login process by processing the information provided by the Solid identity provider through redirect. * * @param url The URL of the page handling the redirect, including the query parameters — these contain the information to process the login. * @since 1.3.0 */ export declare const handleIncomingRedirect: Session["handleIncomingRedirect"]; /** * {@link SessionEventEmitter} instance to subscribe to events by the default session. * * @since 1.14.0 */ export declare const events: () => Session["events"];