feat(api-keys): add api keys management and authentication for n8n workflows
This commit is contained in:
1 parent
ba9472c938
commit
1fff11ee4f
24 files changed
+158204
-5768
No files matched your search
@@ -865,3 +865,21 @@ model MenuItem {
|
||||
@@index([parentId])
|
||||
@@map("menu_items")
|
||||
}
|
||||
|
||||
model ApiKey {
|
||||
id String @id @default(uuid()) @db.Uuid
|
||||
name String @db.VarChar(150)
|
||||
keyHash String @unique @map("key_hash") @db.VarChar(255)
|
||||
keyPrefix String @map("key_prefix") @db.VarChar(30)
|
||||
scopes String @default("*") @db.Text
|
||||
status String @default("ACTIVE") @db.VarChar(20)
|
||||
expiresAt DateTime? @map("expires_at") @db.Timestamptz()
|
||||
lastUsedAt DateTime? @map("last_used_at") @db.Timestamptz()
|
||||
description String? @db.VarChar(255)
|
||||
createdAt DateTime @default(now()) @map("created_at") @db.Timestamptz()
|
||||
updatedAt DateTime @updatedAt @map("updated_at") @db.Timestamptz()
|
||||
|
||||
@@index([keyHash])
|
||||
@@index([status])
|
||||
@@map("api_keys")
|
||||
}
|
||||
Reference in new issue
Block a user