mirror of
https://github.com/juanfont/headscale.git
synced 2026-09-18 14:32:01 +09:00
db: add API-key owner and pre-auth-key description for v2
Give API keys an optional owning user and pre-auth keys a free-text description, plus the state accessors the v2 API needs to act as a key's owner and to persist descriptions.
This commit is contained in:
@@ -44,6 +44,7 @@ CREATE TABLE pre_auth_keys(
|
||||
prefix text,
|
||||
hash blob,
|
||||
user_id integer,
|
||||
description text,
|
||||
reusable numeric,
|
||||
ephemeral numeric DEFAULT false,
|
||||
used numeric DEFAULT false,
|
||||
@@ -60,6 +61,7 @@ CREATE TABLE api_keys(
|
||||
id integer PRIMARY KEY AUTOINCREMENT,
|
||||
prefix text,
|
||||
hash blob,
|
||||
user_id integer,
|
||||
expiration datetime,
|
||||
last_seen datetime,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user