Constant Field Values
Contents
com.irurueta.*
-
com.irurueta.authserver.authorization.infrastructure.persistence.account.JdbcAccountTokenRepositoryModifier and TypeConstant FieldValue
private static final String"UPDATE account_tokens SET used_at = ?\nWHERE hashed_token = ? AND purpose = ? AND used_at IS NULL AND expires_at > ?\nRETURNING id, user_id, purpose, hashed_token, expires_at, used_at\n"private static final String"SELECT id, user_id, purpose, hashed_token, expires_at, used_at FROM account_tokens\nWHERE hashed_token = ? AND purpose = ? AND used_at IS NULL AND expires_at > ?\n"private static final String"INSERT INTO account_tokens (id, user_id, purpose, hashed_token, expires_at, used_at)\nVALUES (?, ?, ?, ?, ?, ?)\n"
-
com.irurueta.authserver.authorization.infrastructure.persistence.clientauth.JdbcClientAssertionReplayRegistry
-
com.irurueta.authserver.authorization.infrastructure.persistence.clients.JdbcClientRegistrationRepositoryModifier and TypeConstant FieldValue
private static final String"(SELECT id FROM oauth2_registered_client WHERE client_id = ?)"private static final String"DELETE FROM oauth2_authorization WHERE registered_client_id = (SELECT id FROM oauth2_registered_client WHERE client_id = ?)"private static final String"DELETE FROM oauth2_authorization_consent WHERE registered_client_id = (SELECT id FROM oauth2_registered_client WHERE client_id = ?)" -
com.irurueta.authserver.authorization.infrastructure.persistence.clients.RegisteredClientMapper
-
com.irurueta.authserver.authorization.infrastructure.persistence.dev.DevDataInitializer
-
com.irurueta.authserver.authorization.infrastructure.persistence.keys.JdbcSigningKeyRepositoryModifier and TypeConstant FieldValue
private static final String"SELECT kid, alg, public_jwk, private_jwk_encrypted, status, created_at, activated_at, retired_at\nFROM signing_keys ORDER BY created_at, kid\n"static final long5203341870000001Lprivate static final String"INSERT INTO signing_keys (kid, alg, public_jwk, private_jwk_encrypted, status, created_at, activated_at,\n retired_at)\nVALUES (?, ?, ?, ?, ?, ?, ?, ?)\nON CONFLICT (kid) DO UPDATE SET status = EXCLUDED.status, activated_at = EXCLUDED.activated_at,\n retired_at = EXCLUDED.retired_at\n"
-
com.irurueta.authserver.authorization.infrastructure.persistence.mfa.JdbcSecondFactorAttemptRepositoryModifier and TypeConstant FieldValue
private static final String"INSERT INTO second_factor_attempts (user_id, failed_count) VALUES (?, 0)\nON CONFLICT (user_id) DO NOTHING\n"private static final String"SELECT failed_count, locked_until FROM second_factor_attempts WHERE user_id = ?\n"private static final String"SELECT failed_count, locked_until FROM second_factor_attempts WHERE user_id = ? FOR UPDATE\n"private static final String"INSERT INTO second_factor_attempts AS t (user_id, failed_count, locked_until)\nVALUES (:userId, 1, CASE WHEN 1 >= :maxAttempts THEN :lockedUntil ELSE NULL END)\nON CONFLICT (user_id) DO UPDATE SET\n failed_count = CASE WHEN t.locked_until IS NOT NULL AND t.locked_until <= :now\n THEN 1 ELSE t.failed_count + 1 END,\n locked_until = CASE\n WHEN (CASE WHEN t.locked_until IS NOT NULL AND t.locked_until <= :now\n THEN 1 ELSE t.failed_count + 1 END) >= :maxAttempts THEN :lockedUntil\n WHEN t.locked_until <= :now THEN NULL\n ELSE t.locked_until END\nRETURNING failed_count, locked_until\n"private static final String"UPDATE second_factor_attempts SET failed_count = 0, locked_until = NULL WHERE user_id = ?\n" -
com.irurueta.authserver.authorization.infrastructure.persistence.mfa.JdbcSecurityEventRepositoryModifier and TypeConstant FieldValue
private static final String"SELECT type, user_id, username, detail, occurred_at FROM security_events\nWHERE user_id = ? ORDER BY occurred_at DESC, id LIMIT ?\n"private static final String"INSERT INTO security_events (id, type, user_id, username, detail, occurred_at)\nVALUES (gen_random_uuid(), ?, ?, ?, ?, ?)\n" -
com.irurueta.authserver.authorization.infrastructure.persistence.mfa.JdbcTrustedDeviceRepositoryModifier and TypeConstant FieldValue
private static final String"id, user_id, hashed_token, user_agent, expires_at, created_at"private static final String"SELECT id, user_id, hashed_token, user_agent, expires_at, created_at FROM trusted_devices WHERE user_id = ? AND expires_at > ? ORDER BY created_at DESC"private static final String"SELECT id, user_id, hashed_token, user_agent, expires_at, created_at FROM trusted_devices WHERE user_id = ? AND hashed_token = ? AND expires_at > ?"private static final String"INSERT INTO trusted_devices (id, user_id, hashed_token, user_agent, expires_at, created_at)\nVALUES (?, ?, ?, ?, ?, ?)\n"
-
com.irurueta.authserver.authorization.infrastructure.persistence.ott.JdbcExpiredLinkTokenPurgerModifier and TypeConstant FieldValue
private static final String"DELETE FROM one_time_tokens WHERE expires_at <= ?" -
com.irurueta.authserver.authorization.infrastructure.persistence.ott.JdbcOneTimeCodeRepositoryModifier and TypeConstant FieldValue
private static final String"DELETE FROM ott_codes WHERE id = ?"private static final String"DELETE FROM ott_codes WHERE binding_id = ? AND username = ?"private static final String"DELETE FROM ott_codes WHERE expires_at <= ?"private static final String"SELECT id, username, channel, purpose, code_hash, binding_id, attempts, expires_at, created_at\nFROM ott_codes\nWHERE binding_id = ? AND username = ? AND expires_at > ?\nORDER BY created_at DESC\nLIMIT 1\n"private static final String"UPDATE ott_codes SET attempts = attempts + 1 WHERE id = ? RETURNING attempts"private static final String"INSERT INTO ott_codes (id, username, channel, purpose, code_hash, binding_id, attempts, expires_at,\n created_at)\nVALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)\n"
-
com.irurueta.authserver.authorization.infrastructure.persistence.passkeys.JdbcPasskeyRepositoryModifier and TypeConstant FieldValue
private static final String"credential_id, user_entity_user_id, label, created, last_used, signature_count, backup_eligible,\nbackup_state"private static final String"DELETE FROM user_credentials WHERE credential_id = ? AND user_entity_user_id = ?\n"private static final String"SELECT EXISTS (SELECT 1 FROM users u JOIN user_entities e ON e.name = u.username\nJOIN user_credentials c ON c.user_entity_user_id = e.id WHERE u.id = ?)\n"private static final String"SELECT credential_id, user_entity_user_id, label, created, last_used, signature_count, backup_eligible,\nbackup_state FROM user_credentials WHERE credential_id = ? AND user_entity_user_id = ?\n"private static final String"SELECT credential_id, user_entity_user_id, label, created, last_used, signature_count, backup_eligible,\nbackup_state FROM user_credentials WHERE user_entity_user_id = ? ORDER BY created, credential_id\n"private static final String"SELECT id FROM user_entities WHERE name = ?\n"private static final String"UPDATE user_credentials SET label = ? WHERE credential_id = ? AND user_entity_user_id = ?\n"
-
com.irurueta.authserver.authorization.infrastructure.persistence.password.JdbcUserAccountRepositoryModifier and TypeConstant FieldValue
private static final String"SELECT authority\nFROM user_authorities\nWHERE user_id = ?\nORDER BY authority\n"private static final String"SELECT u.id, u.username, u.enabled, u.email, u.email_verified, u.tenant, p.encoded_password\nFROM users u JOIN user_passwords p ON p.user_id = u.id\nWHERE u.username = ?"private static final String"SELECT u.id, u.username, u.enabled, u.email, u.email_verified, u.tenant, p.encoded_password\nFROM users u JOIN user_passwords p ON p.user_id = u.id\nWHERE lower(u.email) = lower(?)"private static final String"SELECT u.id, u.username, u.enabled, u.email, u.email_verified, u.tenant, p.encoded_password\nFROM users u JOIN user_passwords p ON p.user_id = u.id\nWHERE u.id = ?"private static final String"UPDATE users SET email_verified = TRUE, enabled = TRUE, updated_at = CURRENT_TIMESTAMP\nWHERE id = ? AND email_verified = FALSE\n"private static final String"SELECT u.id, u.username, u.enabled, u.email, u.email_verified, u.tenant, p.encoded_password\nFROM users u JOIN user_passwords p ON p.user_id = u.id\n"private static final String"INSERT INTO user_passwords (user_id, encoded_password) VALUES (?, ?)\nON CONFLICT (user_id) DO UPDATE SET encoded_password = EXCLUDED.encoded_password,\n generated = FALSE, updated_at = CURRENT_TIMESTAMP\n"private static final String"INSERT INTO users (id, username, enabled, email, email_verified, tenant)\nVALUES (?, ?, ?, ?, ?, ?)\nON CONFLICT (id) DO UPDATE SET username = EXCLUDED.username, enabled = EXCLUDED.enabled,\n email = EXCLUDED.email, email_verified = EXCLUDED.email_verified, tenant = EXCLUDED.tenant,\n updated_at = CURRENT_TIMESTAMP\n"
-
com.irurueta.authserver.authorization.infrastructure.persistence.sms.JdbcPhoneVerificationRepositoryModifier and TypeConstant FieldValue
private static final String"UPDATE user_phones\nSET pending_phone_e164 = NULL, pending_code_hash = NULL, pending_attempts = 0, pending_expires_at = NULL\nWHERE pending_expires_at <= ?\n"private static final String"UPDATE user_phones\nSET pending_phone_e164 = NULL, pending_code_hash = NULL, pending_attempts = 0, pending_expires_at = NULL\nWHERE user_id = ?\n"private static final String"DELETE FROM user_phones WHERE phone_e164 IS NULL AND pending_phone_e164 IS NULL"private static final String"DELETE FROM user_phones WHERE user_id = ? AND phone_e164 IS NULL AND pending_phone_e164 IS NULL"private static final String"SELECT user_id, pending_phone_e164, pending_code_hash, pending_attempts, pending_expires_at\nFROM user_phones\nWHERE user_id = ? AND pending_phone_e164 IS NOT NULL\n"private static final String"UPDATE user_phones SET pending_attempts = pending_attempts + 1\nWHERE user_id = ? AND pending_phone_e164 IS NOT NULL\nRETURNING pending_attempts\n"private static final String"INSERT INTO user_phones (user_id, pending_phone_e164, pending_code_hash, pending_attempts,\n pending_expires_at)\nVALUES (?, ?, ?, ?, ?)\nON CONFLICT (user_id) DO UPDATE\nSET pending_phone_e164 = EXCLUDED.pending_phone_e164,\n pending_code_hash = EXCLUDED.pending_code_hash,\n pending_attempts = EXCLUDED.pending_attempts,\n pending_expires_at = EXCLUDED.pending_expires_at\n" -
com.irurueta.authserver.authorization.infrastructure.persistence.sms.JdbcSmsCostLedgerRepositoryModifier and TypeConstant FieldValue
private static final String"DELETE FROM sms_cost_ledger WHERE sent_at < ?"private static final String"INSERT INTO sms_cost_ledger (sent_at, country, cost_micros)\nSELECT ?::timestamptz, ?::char(2), ?::bigint\nWHERE (SELECT COALESCE(SUM(cost_micros), 0) FROM sms_cost_ledger WHERE sent_at > ?::timestamptz)\n + ?::bigint <= ?::bigint\n AND (SELECT COALESCE(SUM(cost_micros), 0) FROM sms_cost_ledger WHERE sent_at > ?::timestamptz)\n + ?::bigint <= ?::bigint\n"private static final String"SELECT pg_advisory_xact_lock(?)"static final long5203341870000630L -
com.irurueta.authserver.authorization.infrastructure.persistence.sms.JdbcUserPhoneRepositoryModifier and TypeConstant FieldValue
private static final String"UPDATE user_phones SET phone_e164 = NULL, verified_at = NULL WHERE user_id = ?"private static final String"DELETE FROM user_phones WHERE user_id = ? AND phone_e164 IS NULL AND pending_phone_e164 IS NULL"private static final String"SELECT user_id, phone_e164, verified_at FROM user_phones WHERE phone_e164 = ?\n"private static final String"SELECT user_id, phone_e164, verified_at FROM user_phones\nWHERE user_id = ? AND phone_e164 IS NOT NULL\n"private static final String"SELECT pg_advisory_xact_lock(?, hashtext(?))"static final int620private static final String"INSERT INTO user_phones (user_id, phone_e164, verified_at)\nSELECT ?::uuid, ?::varchar, ?::timestamptz\nWHERE NOT EXISTS (SELECT 1 FROM user_phones WHERE phone_e164 = ? AND user_id <> ?)\nON CONFLICT (user_id) DO UPDATE\nSET phone_e164 = EXCLUDED.phone_e164, verified_at = EXCLUDED.verified_at\n"
-
com.irurueta.authserver.authorization.infrastructure.persistence.social.JdbcFederatedIdentityRepositoryModifier and TypeConstant FieldValue
private static final String"id, user_id, provider, subject, email, linked_at, last_login_at"private static final String"SELECT id, user_id, provider, subject, email, linked_at, last_login_at FROM federated_identities WHERE id = ? AND user_id = ?"private static final String"SELECT id, user_id, provider, subject, email, linked_at, last_login_at FROM federated_identities WHERE provider = ? AND subject = ?"private static final String"SELECT id, user_id, provider, subject, email, linked_at, last_login_at FROM federated_identities WHERE user_id = ? ORDER BY linked_at, id"private static final String"SELECT pg_advisory_xact_lock(?, hashtext(?))"static final int700private static final String"INSERT INTO federated_identities (id, user_id, provider, subject, email, linked_at, last_login_at)\nVALUES (?, ?, ?, ?, ?, ?, ?)\nON CONFLICT (id) DO UPDATE SET email = EXCLUDED.email, last_login_at = EXCLUDED.last_login_at\n" -
com.irurueta.authserver.authorization.infrastructure.persistence.social.JdbcSignInMethodsLockModifier and TypeConstant FieldValue
private static final String"SELECT pg_advisory_xact_lock(?, hashtext(?))"static final int701
-
com.irurueta.authserver.authorization.infrastructure.persistence.tokens.JdbcUserAuthorizationRepositoryModifier and TypeConstant FieldValue
private static final String"DELETE FROM oauth2_authorization\nWHERE authorization_code_expires_at IS NULL AND access_token_expires_at IS NULL\n AND oidc_id_token_expires_at IS NULL AND refresh_token_expires_at IS NULL\n AND user_code_expires_at IS NULL AND device_code_expires_at IS NULL\n AND created_at < ?\n"private static final String"DELETE FROM oauth2_authorization\nWHERE GREATEST(authorization_code_expires_at, access_token_expires_at, oidc_id_token_expires_at,\n refresh_token_expires_at, user_code_expires_at, device_code_expires_at) < ?\n" -
com.irurueta.authserver.authorization.infrastructure.persistence.tokens.ReuseDetectingAuthorizationServiceModifier and TypeConstant FieldValue
private static final String"SELECT authorization_id FROM consumed_refresh_tokens WHERE token_hash = ?\n"private static final String"SHA-256"private static final String"INSERT INTO consumed_refresh_tokens (token_hash, authorization_id) VALUES (?, ?)\nON CONFLICT (token_hash) DO NOTHING\n"
-
com.irurueta.authserver.authorization.infrastructure.persistence.totp.JdbcRecoveryCodeRepositoryModifier and TypeConstant FieldValue
private static final String"DELETE FROM recovery_codes WHERE user_id = ?"private static final String"SELECT id, user_id, hashed_code, used_at FROM recovery_codes\nWHERE user_id = ? AND used_at IS NULL\nORDER BY created_at, id\n"private static final String"INSERT INTO recovery_codes (id, user_id, hashed_code, used_at)\nVALUES (?, ?, ?, ?)\n"private static final String"UPDATE recovery_codes SET used_at = ? WHERE id = ? AND used_at IS NULL" -
com.irurueta.authserver.authorization.infrastructure.persistence.totp.JdbcTotpCredentialRepositoryModifier and TypeConstant FieldValue
private static final String"UPDATE totp_credentials SET last_used_step = ?\nWHERE user_id = ? AND last_used_step < ?\n"private static final String"UPDATE totp_credentials SET confirmed = TRUE WHERE user_id = ?"private static final String"DELETE FROM totp_credentials WHERE user_id = ?"private static final String"SELECT user_id, encrypted_secret, confirmed, last_used_step, created_at FROM totp_credentials\nWHERE user_id = ?\n"private static final String"INSERT INTO totp_credentials (user_id, encrypted_secret, confirmed, last_used_step, created_at)\nVALUES (?, ?, ?, ?, ?)\nON CONFLICT (user_id) DO UPDATE SET encrypted_secret = EXCLUDED.encrypted_secret,\n confirmed = EXCLUDED.confirmed, last_used_step = EXCLUDED.last_used_step,\n created_at = EXCLUDED.created_at\n"
-
com.irurueta.authserver.authorization.infrastructure.persistence.x509.JdbcCertificateBindingRepositoryModifier and TypeConstant FieldValue
private static final String"id, user_id, fingerprint_sha256, subject_dn, created_at"private static final String"SELECT id, user_id, fingerprint_sha256, subject_dn, created_at FROM x509_certificates WHERE fingerprint_sha256 = ?"private static final String"SELECT id, user_id, fingerprint_sha256, subject_dn, created_at FROM x509_certificates WHERE user_id = ? ORDER BY created_at, id"private static final String"INSERT INTO x509_certificates (id, user_id, fingerprint_sha256, subject_dn, created_at)\nVALUES (?, ?, ?, ?, ?)\n"