From 0920c4d4f30a3345870d385d5c6f3e0919228b56 Mon Sep 17 00:00:00 2001
From: benj <benj@rse8.com>
Date: Mon, 12 Dec 2022 17:06:57 -0800
Subject: (oauth2 + email added): a mess that may or may not really work and
 needs to be refactored...

---
 .../store/sqlite/sql/read_oauth_validation.sql     | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 crates/secd/store/sqlite/sql/read_oauth_validation.sql

(limited to 'crates/secd/store/sqlite/sql/read_oauth_validation.sql')

diff --git a/crates/secd/store/sqlite/sql/read_oauth_validation.sql b/crates/secd/store/sqlite/sql/read_oauth_validation.sql
new file mode 100644
index 0000000..75f5a94
--- /dev/null
+++ b/crates/secd/store/sqlite/sql/read_oauth_validation.sql
@@ -0,0 +1,23 @@
+select oauth_validation_public_id
+       , i.identity_public_id
+       , ov.access_token
+       , ov.raw_response
+       , ov.created_at
+       , ov.validated_at
+       , iov.revoked_at
+       , iov.deleted_at
+       , op.name          as oauth_provider_name
+       , op.flow          as oauth_provider_flow
+       , op.base_url      as oauth_provider_base_url
+       , op.response_type as oauth_provider_response_type
+       , op.default_scope as oauth_provider_default_scope
+       , op.client_id     as oauth_provider_client_id
+       , op.client_secret as oauth_provider_client_secret
+       , op.redirect_url  as oauth_provider_redirect_url
+       , op.created_at    as oauth_provider_created_at
+       , op.deleted_at    as oauth_provider_deleted_at
+from oauth_validation               ov
+join oauth_provider                 op  using(oauth_provider_id)
+left join identity_oauth_validation iov using(oauth_validation_id)
+left join identity                  i   using(identity_id)
+where oauth_validation_public_id = ?1;
-- 
cgit v1.2.3

