import { Db } from "mongodb"; import OidcSession from "../schemas/OidcSession"; /** * Repository for OIDC sessions * * Manages temporary sessions during the OIDC authorization flow. * Sessions are automatically deleted by MongoDB TTL index after expiration. */ export default class OidcSessionRepo { private collection; constructor(collectionName: string, db: Db); /** * Create a new OIDC session * * @param session - Session data * @returns Created session with _id */ create(session: Omit): Promise; /** * Find session by state parameter * * Used during callback to validate the state and retrieve session data. * * @param state - State parameter from callback * @returns Session or null if not found */ getByState(state: string): Promise; /** * Find one session by query * * @param query - MongoDB query * @returns Session or null if not found */ getOne(query: Partial): Promise; /** * Delete session by session ID * * Sessions are one-time use - delete after successful validation. * * @param sessionId - Session identifier */ deleteBySessionId(sessionId: string): Promise; /** * Delete session by state * * @param state - State parameter */ deleteByState(state: string): Promise; /** * Delete all expired sessions * * This is handled automatically by MongoDB TTL index, * but can be called manually for testing or cleanup. */ deleteExpired(): Promise; } //# sourceMappingURL=OidcSessionRepo.d.ts.map