From ed34a5251f13bbded0aa15719887db4924b351eb Mon Sep 17 00:00:00 2001
From: benj <benj@rse8.com>
Date: Mon, 22 May 2023 15:47:06 -0700
Subject: update credential API to include sessions

This change updates the credential API to include sessions as just another
credential type. It adds the ApiToken type and enables revocation of
credentials. Updates were also made to the Identity API which now includes a
list of new credentials added to an Identity.

This change also migrates off the hacky ENV configuration paradigm and includes
a new config.toml file specified by the SECD_CONFIG_PATH env var. No default is
currently provided.

Clippy updates and code cleanup.
---
 crates/secd/store/pg/sql/write_session.sql | 11 -----------
 1 file changed, 11 deletions(-)
 delete mode 100644 crates/secd/store/pg/sql/write_session.sql

(limited to 'crates/secd/store/pg/sql/write_session.sql')

diff --git a/crates/secd/store/pg/sql/write_session.sql b/crates/secd/store/pg/sql/write_session.sql
deleted file mode 100644
index aa9c0a1..0000000
--- a/crates/secd/store/pg/sql/write_session.sql
+++ /dev/null
@@ -1,11 +0,0 @@
-insert into secd.session (
-       identity_id
-       , token_hash
-       , created_at
-       , expired_at
-       , revoked_at
-) values (
-  (select identity_id from secd.identity where identity_public_id = $1)
-  , $2, $3, $4, $5
-) on conflict (token_hash) do update
-  set revoked_at = excluded.revoked_at;
-- 
cgit v1.2.3

