Basics of auth
Some checks failed
🧪✨ Tests Workflow / 🛡️ 🔒 Library Audit (push) Successful in 2m31s
🧪✨ Tests Workflow / 📝 ✨ Code Lint (push) Successful in 2m24s
🧪✨ Tests Workflow / 🛡️ 🔒 License Check (push) Successful in 2m57s
🧪✨ Tests Workflow / 🧪 ✨ Database Migrations (push) Successful in 3m14s
🧪✨ Tests Workflow / 🐙 🔍 Code Sniffer (push) Failing after 2m58s
🧪✨ Tests Workflow / 🧪 ✅ Unit Tests (push) Failing after 1m24s

This commit is contained in:
2026-01-01 15:38:19 -05:00
parent 9f895bbb85
commit d0cee7b48f
35 changed files with 664 additions and 202 deletions

View File

@@ -1,41 +1,41 @@
create table clients
(
id uuid default gen_random_uuid()
id VARCHAR(26) not null
constraint client_pk
primary key,
client_id varchar not null
client_id varchar not null
constraint client_client_id_key
unique,
client_secret varchar not null,
name varchar not null,
description varchar default '',
private_key text not null,
encryption_key text not null,
grant_types jsonb not null default '[]'::jsonb,
capabilities jsonb not null default '[]'::jsonb,
confidential boolean not null default true,
created_at timestamp default now(),
updated_at timestamp default now()
client_secret varchar not null,
name varchar not null,
description varchar default '',
private_key text not null,
encryption_key text not null,
grant_types jsonb not null default '[]'::jsonb,
capabilities jsonb not null default '[]'::jsonb,
confidential boolean not null default true,
created_at timestamp default now(),
updated_at timestamp default now()
);
create table client_redirect_uris
(
id uuid default gen_random_uuid()
id VARCHAR(26) not null
constraint client_redirect_uris_pk
primary key,
client_id uuid not null
client_id VARCHAR(26) not null
constraint client_redirect_uris_client_id_fk
references clients
on delete cascade,
redirect_uri varchar not null
redirect_uri varchar not null
);
create table scopes
(
id uuid default gen_random_uuid()
id VARCHAR(26) not null
constraint scopes_pk
primary key,
name varchar not null
name varchar not null
constraint scopes_name_key
unique,
description varchar
@@ -43,14 +43,14 @@ create table scopes
create table client_scopes
(
id uuid default gen_random_uuid()
id VARCHAR(26) not null
constraint client_scopes_pk
primary key,
client_id uuid not null
client_id VARCHAR(26) not null
constraint client_scopes_client_id_fk
references clients
on delete cascade,
scope_id uuid not null
scope_id VARCHAR(26) not null
constraint client_scopes_scope_id_fk
references scopes
on delete cascade,
@@ -60,29 +60,29 @@ create table client_scopes
create table users
(
id uuid default gen_random_uuid()
id VARCHAR(26) not null
constraint users_pk
primary key,
first_name varchar not null,
last_name varchar not null,
email varchar not null
first_name varchar not null,
last_name varchar not null,
email varchar not null
constraint users_email_key
unique,
password varchar not null,
password varchar not null,
created_at timestamp default now(),
updated_at timestamp default now()
);
create table client_users
(
id uuid default gen_random_uuid()
id VARCHAR(26) not null
constraint client_users_pk
primary key,
client_id uuid not null
client_id VARCHAR(26) not null
constraint client_users_client_id_fk
references clients
on delete cascade,
user_id uuid not null
user_id VARCHAR(26) not null
constraint client_users_user_id_fk
references users
on delete cascade,