import type { IncomingMessage } from "node:http"; import type { Context, NodeApplication } from "alp-node"; import type MongoUsersManager from "./MongoUsersManager"; import type { AuthController as AuthControllerType, AuthHooks } from "./createAuthController"; import type { AuthRoutes as AuthRoutesType } from "./createRoutes"; import type { Strategies } from "./services/authentification/AuthenticationService"; import type { AllowedStrategyKeys } from "./services/authentification/types"; import type { AccountService } from "./services/user/types"; import type { User, UserSanitized } from "./types"; export { default as MongoUsersManager } from "./MongoUsersManager"; export { default as UserAccountGoogleService } from "./services/user/UserAccountGoogleService"; export { default as UserAccountSlackService } from "./services/user/UserAccountSlackService"; export { authSocketIO } from "./authSocketIO"; export { createAuthApolloContext } from "./authApolloContext"; export { STATUSES } from "./services/user/UserAccountsService"; export type * from "./types"; declare module "alp-node" { interface ContextState { loggedInUserId: NonNullable["_id"] | null | undefined; loggedInUser: User | null | undefined; } interface ContextSanitizedState { loggedInUserId: NonNullable["_id"] | null | undefined; loggedInUser: UserSanitized | null | undefined; } interface BaseContext { setLoggedIn: (loggedInUserId: NonNullable, loggedInUser: NonNullable) => Promise; logout: () => void; } } export type AuthController = AuthControllerType; export type AuthRoutes = AuthRoutesType; export { AuthenticationService } from "./services/authentification/AuthenticationService"; export default function init({ homeRouterKey, usersManager, strategies, defaultStrategy, strategyToService, authHooks, jwtAudience, }: { homeRouterKey?: string; usersManager: MongoUsersManager; strategies: Strategies; defaultStrategy?: StrategyKeys; strategyToService: Record>; authHooks?: AuthHooks; jwtAudience?: string; }): (app: NodeApplication) => { routes: AuthRoutesType; findLoggedInUserFromRequest: (req: IncomingMessage) => ReturnType>; findLoggedInUser: import("./utils/createFindLoggedInUser").FindLoggedInUser; middleware: (ctx: Context, next: () => Promise | T) => Promise; }; //# sourceMappingURL=index.d.ts.map