summaryrefslogtreecommitdiff
path: root/internal/storage/sql_provider_queries.go
diff options
context:
space:
mode:
authorJames Elliott <james-d-elliott@users.noreply.github.com>2023-10-26 19:41:06 +1100
committerJames Elliott <james-d-elliott@users.noreply.github.com>2024-03-04 20:29:11 +1100
commit2a388194fbf56e8c030dc734f980dc223760b8d9 (patch)
tree6dd17b6e4cbe3d1c0f6ab556632ae6fd2f68d145 /internal/storage/sql_provider_queries.go
parentf81b414147014a8096ef995ea691c0010a4aab67 (diff)
feat(web): revoke reset password tokens
This adds functionality to the frontend to revoke the Reset Password JWT's. Closes #136 Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
Diffstat (limited to 'internal/storage/sql_provider_queries.go')
-rw-r--r--internal/storage/sql_provider_queries.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/internal/storage/sql_provider_queries.go b/internal/storage/sql_provider_queries.go
index fb9276458..bff832dbd 100644
--- a/internal/storage/sql_provider_queries.go
+++ b/internal/storage/sql_provider_queries.go
@@ -57,7 +57,7 @@ const (
const (
queryFmtSelectIdentityVerification = `
- SELECT id, jti, iat, issued_ip, exp, username, action, consumed, consumed_ip
+ SELECT id, jti, iat, issued_ip, exp, username, action, consumed, consumed_ip, revoked, revoked_ip
FROM %s
WHERE jti = ?;`
@@ -69,6 +69,11 @@ const (
UPDATE %s
SET consumed = CURRENT_TIMESTAMP, consumed_ip = ?
WHERE jti = ?;`
+
+ queryFmtRevokeIdentityVerification = `
+ UPDATE %s
+ SET revoked = CURRENT_TIMESTAMP, revoked_ip = ?
+ WHERE jti = ?;`
)
const (