While there can be namespaces without a secret, commonly the namespace should basically be the username and the password the login secret.
8 lines
327 B
SQL
8 lines
327 B
SQL
-- Auth secrets for bearer token authentication
|
|
CREATE TABLE IF NOT EXISTS auth_secrets (
|
|
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
namespace_id UUID NOT NULL REFERENCES namespaces(id) ON DELETE CASCADE,
|
|
secret_hash TEXT NOT NULL,
|
|
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
|
|
UNIQUE(namespace_id)
|
|
);
|