Add cookie-based authentication support

Fixes #1303
This commit is contained in:
Zed
2025-11-15 22:59:35 +01:00
parent 9e95615021
commit f89d2329d2
4 changed files with 56 additions and 18 deletions

View File

@@ -31,14 +31,23 @@ type
remaining*: int
reset*: int
SessionKind* = enum
oauth
cookie
Session* = ref object
id*: int64
oauthToken*: string
oauthSecret*: string
pending*: int
limited*: bool
limitedAt*: int
apis*: Table[Api, RateLimit]
case kind*: SessionKind
of oauth:
oauthToken*: string
oauthSecret*: string
of cookie:
authToken*: string
ct0*: string
Error* = enum
null = 0