You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-07-31 09:24:31 +03:00
Remove trailing spaces
This commit is contained in:
@ -344,7 +344,7 @@ pub async fn compat_login(
|
||||
let id = Ulid::from_datetime(created_at.into());
|
||||
sqlx::query!(
|
||||
r#"
|
||||
INSERT INTO compat_sessions
|
||||
INSERT INTO compat_sessions
|
||||
(compat_session_id, user_id, device_id, created_at)
|
||||
VALUES ($1, $2, $3, $4)
|
||||
"#,
|
||||
@ -383,7 +383,7 @@ pub async fn add_compat_access_token(
|
||||
|
||||
sqlx::query!(
|
||||
r#"
|
||||
INSERT INTO compat_access_tokens
|
||||
INSERT INTO compat_access_tokens
|
||||
(compat_access_token_id, compat_session_id, access_token, created_at, expires_at)
|
||||
VALUES ($1, $2, $3, $4, $5)
|
||||
"#,
|
||||
@ -532,7 +532,7 @@ pub async fn insert_compat_sso_login(
|
||||
let id = Ulid::from_datetime(created_at.into());
|
||||
sqlx::query!(
|
||||
r#"
|
||||
INSERT INTO compat_sso_logins
|
||||
INSERT INTO compat_sso_logins
|
||||
(compat_sso_login_id, login_token, redirect_uri, created_at)
|
||||
VALUES ($1, $2, $3, $4)
|
||||
"#,
|
||||
|
@ -24,7 +24,7 @@ use super::client::{lookup_client, ClientFetchError};
|
||||
use crate::{DatabaseInconsistencyError, PostgresqlBackend};
|
||||
|
||||
#[tracing::instrument(
|
||||
skip_all,
|
||||
skip_all,
|
||||
fields(
|
||||
session.id = %session.data,
|
||||
client.id = %session.client.data,
|
||||
@ -237,7 +237,7 @@ where
|
||||
}
|
||||
|
||||
#[tracing::instrument(
|
||||
skip_all,
|
||||
skip_all,
|
||||
fields(access_token.id = %access_token.data),
|
||||
err(Debug),
|
||||
)]
|
||||
@ -272,7 +272,7 @@ pub async fn cleanup_expired(executor: impl PgExecutor<'_>) -> anyhow::Result<u6
|
||||
let res = sqlx::query!(
|
||||
r#"
|
||||
DELETE FROM oauth2_access_tokens
|
||||
WHERE expires_at < $1
|
||||
WHERE expires_at < $1
|
||||
"#,
|
||||
threshold,
|
||||
)
|
||||
|
@ -33,7 +33,7 @@ use super::client::lookup_client;
|
||||
use crate::{DatabaseInconsistencyError, PostgresqlBackend};
|
||||
|
||||
#[tracing::instrument(
|
||||
skip_all,
|
||||
skip_all,
|
||||
fields(
|
||||
client.id = %client.data,
|
||||
grant.id,
|
||||
@ -352,7 +352,7 @@ impl GrantLookup {
|
||||
}
|
||||
|
||||
#[tracing::instrument(
|
||||
skip_all,
|
||||
skip_all,
|
||||
fields(grant.id = %id),
|
||||
err(Debug),
|
||||
)]
|
||||
@ -492,7 +492,7 @@ pub async fn lookup_grant_by_code(
|
||||
}
|
||||
|
||||
#[tracing::instrument(
|
||||
skip_all,
|
||||
skip_all,
|
||||
fields(
|
||||
grant.id = %grant.data,
|
||||
client.id = %grant.client.data,
|
||||
@ -544,7 +544,7 @@ pub async fn derive_session(
|
||||
}
|
||||
|
||||
#[tracing::instrument(
|
||||
skip_all,
|
||||
skip_all,
|
||||
fields(
|
||||
grant.id = %grant.data,
|
||||
client.id = %grant.client.data,
|
||||
@ -584,7 +584,7 @@ pub async fn fulfill_grant(
|
||||
}
|
||||
|
||||
#[tracing::instrument(
|
||||
skip_all,
|
||||
skip_all,
|
||||
fields(
|
||||
grant.id = %grant.data,
|
||||
client.id = %grant.client.data,
|
||||
@ -614,7 +614,7 @@ pub async fn give_consent_to_grant(
|
||||
}
|
||||
|
||||
#[tracing::instrument(
|
||||
skip_all,
|
||||
skip_all,
|
||||
fields(
|
||||
grant.id = %grant.data,
|
||||
client.id = %grant.client.data,
|
||||
|
@ -259,8 +259,8 @@ pub async fn lookup_client(
|
||||
c.oauth2_client_id,
|
||||
c.encrypted_client_secret,
|
||||
ARRAY(
|
||||
SELECT redirect_uri
|
||||
FROM oauth2_client_redirect_uris r
|
||||
SELECT redirect_uri
|
||||
FROM oauth2_client_redirect_uris r
|
||||
WHERE r.oauth2_client_id = c.oauth2_client_id
|
||||
) AS "redirect_uris!",
|
||||
c.grant_type_authorization_code,
|
||||
@ -380,7 +380,7 @@ pub async fn insert_client(
|
||||
let id = Ulid::new();
|
||||
sqlx::query!(
|
||||
r#"
|
||||
INSERT INTO oauth2_client_redirect_uris
|
||||
INSERT INTO oauth2_client_redirect_uris
|
||||
(oauth2_client_redirect_uri_id, oauth2_client_id, redirect_uri)
|
||||
VALUES ($1, $2, $3)
|
||||
"#,
|
||||
@ -437,7 +437,7 @@ pub async fn insert_client_from_config(
|
||||
let id = Ulid::new();
|
||||
sqlx::query!(
|
||||
r#"
|
||||
INSERT INTO oauth2_client_redirect_uris
|
||||
INSERT INTO oauth2_client_redirect_uris
|
||||
(oauth2_client_redirect_uri_id, oauth2_client_id, redirect_uri)
|
||||
VALUES ($1, $2, $3)
|
||||
"#,
|
||||
|
@ -67,7 +67,7 @@ pub async fn insert_client_consent(
|
||||
|
||||
sqlx::query!(
|
||||
r#"
|
||||
INSERT INTO oauth2_consents
|
||||
INSERT INTO oauth2_consents
|
||||
(oauth2_consent_id, user_id, oauth2_client_id, scope_token, created_at)
|
||||
SELECT id, $2, $3, scope_token, $5 FROM UNNEST($1::uuid[], $4::text[]) u(id, scope_token)
|
||||
ON CONFLICT (user_id, oauth2_client_id, scope_token) DO UPDATE SET refreshed_at = $5
|
||||
|
@ -193,7 +193,7 @@ pub async fn lookup_active_session(
|
||||
ue.created_at AS "user_email_created_at?",
|
||||
ue.confirmed_at AS "user_email_confirmed_at?"
|
||||
FROM user_sessions s
|
||||
INNER JOIN users u
|
||||
INNER JOIN users u
|
||||
USING (user_id)
|
||||
LEFT JOIN user_session_authentications a
|
||||
USING (user_session_id)
|
||||
@ -317,7 +317,7 @@ pub async fn authenticate_session(
|
||||
let id = Ulid::from_datetime(created_at.into());
|
||||
sqlx::query!(
|
||||
r#"
|
||||
INSERT INTO user_session_authentications
|
||||
INSERT INTO user_session_authentications
|
||||
(user_session_authentication_id, user_session_id, created_at)
|
||||
VALUES ($1, $2, $3)
|
||||
"#,
|
||||
@ -453,7 +453,7 @@ pub async fn lookup_user_by_username(
|
||||
let res = sqlx::query_as!(
|
||||
UserLookup,
|
||||
r#"
|
||||
SELECT
|
||||
SELECT
|
||||
u.user_id,
|
||||
u.username AS user_username,
|
||||
ue.user_email_id AS "user_email_id?",
|
||||
@ -541,7 +541,7 @@ pub async fn get_user_emails(
|
||||
let res = sqlx::query_as!(
|
||||
UserEmailLookup,
|
||||
r#"
|
||||
SELECT
|
||||
SELECT
|
||||
ue.user_email_id,
|
||||
ue.email AS "user_email",
|
||||
ue.created_at AS "user_email_created_at",
|
||||
@ -570,7 +570,7 @@ pub async fn get_user_email(
|
||||
let res = sqlx::query_as!(
|
||||
UserEmailLookup,
|
||||
r#"
|
||||
SELECT
|
||||
SELECT
|
||||
ue.user_email_id,
|
||||
ue.email AS "user_email",
|
||||
ue.created_at AS "user_email_created_at",
|
||||
@ -673,7 +673,7 @@ pub async fn lookup_user_email(
|
||||
let res = sqlx::query_as!(
|
||||
UserEmailLookup,
|
||||
r#"
|
||||
SELECT
|
||||
SELECT
|
||||
ue.user_email_id,
|
||||
ue.email AS "user_email",
|
||||
ue.created_at AS "user_email_created_at",
|
||||
@ -703,7 +703,7 @@ pub async fn lookup_user_email_by_id(
|
||||
let res = sqlx::query_as!(
|
||||
UserEmailLookup,
|
||||
r#"
|
||||
SELECT
|
||||
SELECT
|
||||
ue.user_email_id,
|
||||
ue.email AS "user_email",
|
||||
ue.created_at AS "user_email_created_at",
|
||||
@ -848,7 +848,7 @@ pub async fn add_user_email_verification_code(
|
||||
|
||||
sqlx::query!(
|
||||
r#"
|
||||
INSERT INTO user_email_confirmation_codes
|
||||
INSERT INTO user_email_confirmation_codes
|
||||
(user_email_confirmation_code_id, user_email_id, code, created_at, expires_at)
|
||||
VALUES ($1, $2, $3, $4, $5)
|
||||
"#,
|
||||
|
Reference in New Issue
Block a user