1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-07-28 11:02:02 +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

@ -37,7 +37,7 @@ pub trait UpstreamOAuthLinkRepository: Send + Sync {
async fn add(
&mut self,
rng: &mut (dyn RngCore + Send),
clock: &Clock,
clock: &dyn Clock,
upstream_oauth_provider: &UpstreamOAuthProvider,
subject: String,
) -> Result<UpstreamOAuthLink, Self::Error>;

View File

@ -33,7 +33,7 @@ pub trait UpstreamOAuthProviderRepository: Send + Sync {
async fn add(
&mut self,
rng: &mut (dyn RngCore + Send),
clock: &Clock,
clock: &dyn Clock,
issuer: String,
scope: Scope,
token_endpoint_auth_method: OAuthClientAuthenticationMethod,

View File

@ -33,7 +33,7 @@ pub trait UpstreamOAuthSessionRepository: Send + Sync {
async fn add(
&mut self,
rng: &mut (dyn RngCore + Send),
clock: &Clock,
clock: &dyn Clock,
upstream_oauth_provider: &UpstreamOAuthProvider,
state: String,
code_challenge_verifier: Option<String>,
@ -43,7 +43,7 @@ pub trait UpstreamOAuthSessionRepository: Send + Sync {
/// Mark a session as completed and associate the given link
async fn complete_with_link(
&mut self,
clock: &Clock,
clock: &dyn Clock,
upstream_oauth_authorization_session: UpstreamOAuthAuthorizationSession,
upstream_oauth_link: &UpstreamOAuthLink,
id_token: Option<String>,
@ -52,7 +52,7 @@ pub trait UpstreamOAuthSessionRepository: Send + Sync {
/// Mark a session as consumed
async fn consume(
&mut self,
clock: &Clock,
clock: &dyn Clock,
upstream_oauth_authorization_session: UpstreamOAuthAuthorizationSession,
) -> Result<UpstreamOAuthAuthorizationSession, Self::Error>;
}