1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-11-21 23:00:50 +03:00

storage: make the Clock a trait

This commit is contained in:
Quentin Gliech
2023-01-18 12:20:30 +01:00
parent 73a921cc30
commit 142fdbd45a
62 changed files with 261 additions and 212 deletions

View File

@@ -211,7 +211,7 @@ impl<'c> OAuth2AuthorizationGrantRepository for PgOAuth2AuthorizationGrantReposi
async fn add(
&mut self,
rng: &mut (dyn RngCore + Send),
clock: &Clock,
clock: &dyn Clock,
client: &Client,
redirect_uri: Url,
scope: Scope,
@@ -410,7 +410,7 @@ impl<'c> OAuth2AuthorizationGrantRepository for PgOAuth2AuthorizationGrantReposi
)]
async fn fulfill(
&mut self,
clock: &Clock,
clock: &dyn Clock,
session: &Session,
grant: AuthorizationGrant,
) -> Result<AuthorizationGrant, Self::Error> {
@@ -451,7 +451,7 @@ impl<'c> OAuth2AuthorizationGrantRepository for PgOAuth2AuthorizationGrantReposi
)]
async fn exchange(
&mut self,
clock: &Clock,
clock: &dyn Clock,
grant: AuthorizationGrant,
) -> Result<AuthorizationGrant, Self::Error> {
let exchanged_at = clock.now();