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_identity.sql | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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

diff --git a/crates/secd/store/pg/sql/write_identity.sql b/crates/secd/store/pg/sql/write_identity.sql
index 4b2745b..e86d2f5 100644
--- a/crates/secd/store/pg/sql/write_identity.sql
+++ b/crates/secd/store/pg/sql/write_identity.sql
@@ -9,4 +9,5 @@ insert into secd.identity (
 ) on conflict (identity_public_id) do update
   set data = excluded.data
       , updated_at = excluded.updated_at
-      , deleted_at = excluded.deleted_at;
+      , deleted_at = excluded.deleted_at
+returning (xmax = 0);
-- 
cgit v1.2.3

