feat(#11): live-policy auth + 6 companion admin RPCs + Token.revokedAt #13
2 changed files with 3 additions and 0 deletions
chore(schema): add Token.revokedAt for surgical token revocation (#11)
Pre-requisite for the live-policy auth rewrite in #11. The new revoke_token admin RPC needs a way to mark a single Token as revoked without nuking the whole KeyUser (revoke_user) or conflating with future expiry cleanup (deletedAt). Nullable DateTime — existing rows default to NULL (active), no data migration needed. refs: #11
commit
eb6c86a4d1
|
|
@ -0,0 +1,2 @@
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE "Token" ADD COLUMN "revokedAt" DATETIME;
|
||||||
|
|
@ -110,6 +110,7 @@ model Token {
|
||||||
deletedAt DateTime?
|
deletedAt DateTime?
|
||||||
expiresAt DateTime?
|
expiresAt DateTime?
|
||||||
redeemedAt DateTime?
|
redeemedAt DateTime?
|
||||||
|
revokedAt DateTime?
|
||||||
keyUserId Int?
|
keyUserId Int?
|
||||||
policyId Int?
|
policyId Int?
|
||||||
policy Policy? @relation(fields: [policyId], references: [id])
|
policy Policy? @relation(fields: [policyId], references: [id])
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue