1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-07-31 09:24:31 +03:00

Soft-delete upstream OAuth 2.0 providers on config sync

This commit is contained in:
Quentin Gliech
2024-04-03 09:18:22 +02:00
parent 4e3823fe4f
commit cd0ec35d2f
6 changed files with 108 additions and 20 deletions

View File

@ -204,6 +204,8 @@ pub trait UpstreamOAuthProviderRepository: Send + Sync {
/// Disable an upstream OAuth provider
///
/// Returns the disabled provider
///
/// # Parameters
///
/// * `clock`: The clock used to generate timestamps
@ -216,7 +218,7 @@ pub trait UpstreamOAuthProviderRepository: Send + Sync {
&mut self,
clock: &dyn Clock,
provider: UpstreamOAuthProvider,
) -> Result<(), Self::Error>;
) -> Result<UpstreamOAuthProvider, Self::Error>;
/// List [`UpstreamOAuthProvider`] with the given filter and pagination
///
@ -281,7 +283,7 @@ repository_impl!(UpstreamOAuthProviderRepository:
&mut self,
clock: &dyn Clock,
provider: UpstreamOAuthProvider
) -> Result<(), Self::Error>;
) -> Result<UpstreamOAuthProvider, Self::Error>;
async fn list(
&mut self,