aboutsummaryrefslogtreecommitdiff
path: root/crates/secd/store/pg/sql/write_session.sql
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--crates/secd/store/pg/sql/write_session.sql13
1 files changed, 4 insertions, 9 deletions
diff --git a/crates/secd/store/pg/sql/write_session.sql b/crates/secd/store/pg/sql/write_session.sql
index 1b238c6..18dc1f1 100644
--- a/crates/secd/store/pg/sql/write_session.sql
+++ b/crates/secd/store/pg/sql/write_session.sql
@@ -1,15 +1,10 @@
insert into secd.session (
identity_id
- , secret_hash
+ , 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 (secret_hash) do update
- set revoked_at = excluded.revoked_at;
---
+ (select identity_id from secd.identity where identity_public_id = $1)
+ , $2, $3, $4, $5
+);