import { NamedNode } from 'rdflib'; import type { SessionWithLegacyEvents } from '../authSession/authSession'; import type { AuthenticationContext, AuthnLogic } from '../types'; export declare class SolidAuthnLogic implements AuthnLogic { private session; private checkUserInFlight; private sessionRestoreHookAttached; /** * This instance's subscription to the session's identity state. Its lifetime * IS this instance's: a cookie probe that answers after `dispose()` is * ignored, and the refocus listener is removed with the last instance using * the session (see identityState.ts). */ private identity; constructor(solidAuthSession: SessionWithLegacyEvents); /** * Detaches this instance from the session's identity state: the refocus * listener is removed with the last instance using the session, and a probe * that is still in flight can no longer apply its result. */ dispose(): void; /** * Re-probes the NSS cookie-backed identity. Skipped while the session owns * the identity — the probe only exists for the case where it does not — and * the state drops the result if the session takes ownership while the probe * is in flight. */ private refreshCookieBackedFallback; get authSession(): SessionWithLegacyEvents; currentUser(): NamedNode | null; /** * Retrieves currently logged in webId from either * defaultTestUser or SolidAuth * Also activates a session after login * @param [setUserCallback] Optional callback * @returns Resolves with webId uri, if no callback provided */ checkUser(setUserCallback?: (me: NamedNode | null) => T): Promise; private resolveCurrentUser; private probeNssCookieBackedWebId; /** * Saves `webId` in `context.me` * @param webId * @param context * * @returns Returns the WebID, after setting it */ saveUser(webId: NamedNode | string | null, context?: AuthenticationContext): NamedNode | null; /** * @returns {Promise} Resolves with WebID URI or null */ webIdFromSession(sessionInfo?: { webId?: string; isLoggedIn?: boolean; }, sessionRoot?: { webId?: string; isLoggedIn?: boolean; isActive?: boolean; }): string | null; } //# sourceMappingURL=SolidAuthnLogic.d.ts.map