@authhero/kysely-adapter 12.5.0 → 12.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,14 @@
1
+ import { Kysely } from "kysely";
2
+ import { Database } from "../db";
3
+ /**
4
+ * Soft-revoke every unrevoked refresh token owned by a session.
5
+ *
6
+ * One hop on the `(tenant_id, session_id)` index rather than resolving through
7
+ * the login session, which only ever records the session's *originating*
8
+ * authorization transaction and so misses tokens minted in later SSO
9
+ * re-authorizations.
10
+ *
11
+ * `revoked_at_ts IS NULL` keeps this idempotent and concurrency-safe — a
12
+ * second revocation cannot overwrite the audit timestamp written by the first.
13
+ */
14
+ export declare function revokeBySession(db: Kysely<Database>): (tenant_id: string, session_id: string, revoked_at: string) => Promise<number>;