diff options
Diffstat (limited to 'internal/storage/sql_provider_queries.go')
| -rw-r--r-- | internal/storage/sql_provider_queries.go | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/internal/storage/sql_provider_queries.go b/internal/storage/sql_provider_queries.go index 327ab546f..f062f8afb 100644 --- a/internal/storage/sql_provider_queries.go +++ b/internal/storage/sql_provider_queries.go @@ -83,18 +83,16 @@ const ( LIMIT ? OFFSET ?;` + queryFmtSelectTOTPConfigurationsEncryptedData = ` + SELECT id, secret + FROM %s;` + //nolint:gosec // These are not hardcoded credentials it's a query to obtain credentials. queryFmtUpdateTOTPConfigurationSecret = ` UPDATE %s SET secret = ? WHERE id = ?;` - //nolint:gosec // These are not hardcoded credentials it's a query to obtain credentials. - queryFmtUpdateTOTPConfigurationSecretByUsername = ` - UPDATE %s - SET secret = ? - WHERE username = ?;` - queryFmtUpsertTOTPConfiguration = ` REPLACE INTO %s (created_at, last_used_at, username, issuer, algorithm, digits, period, secret) VALUES (?, ?, ?, ?, ?, ?, ?, ?);` @@ -127,6 +125,10 @@ const ( LIMIT ? OFFSET ?;` + queryFmtSelectWebauthnDevicesEncryptedData = ` + SELECT id, public_key + FROM %s;` + queryFmtSelectWebauthnDevicesByUsername = ` SELECT id, created_at, last_used_at, rpid, username, description, kid, public_key, attestation_type, transport, aaguid, sign_count, clone_warning FROM %s @@ -137,11 +139,6 @@ const ( SET public_key = ? WHERE id = ?;` - queryFmtUpdateUpdateWebauthnDevicePublicKeyByUsername = ` - UPDATE %s - SET public_key = ? - WHERE username = ? AND kid = ?;` - queryFmtUpdateWebauthnDeviceRecordSignIn = ` UPDATE %s SET @@ -265,6 +262,11 @@ const ( SET subject = ? WHERE id = ?;` + queryFmtUpdateOAuth2ConsentSessionSessionData = ` + UPDATE %s + SET session_data = ? + WHERE id = ?;` + queryFmtUpdateOAuth2ConsentSessionResponse = ` UPDATE %s SET authorized = ?, responded_at = CURRENT_TIMESTAMP, granted_scopes = ?, granted_audience = ?, preconfiguration = ? @@ -282,6 +284,10 @@ const ( FROM %s WHERE signature = ? AND revoked = FALSE;` + queryFmtSelectOAuth2SessionEncryptedData = ` + SELECT id, session_data + FROM %s;` + queryFmtInsertOAuth2Session = ` INSERT INTO %s (challenge_id, request_id, client_id, signature, subject, requested_at, requested_scopes, granted_scopes, requested_audience, granted_audience, |
