You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-11-20 12:02:22 +03:00
storage: make the Clock a trait
This commit is contained in:
@@ -30,7 +30,7 @@ use mas_policy::PolicyFactory;
|
||||
use mas_router::{PostAuthAction, Route};
|
||||
use mas_storage::{
|
||||
oauth2::{OAuth2AuthorizationGrantRepository, OAuth2ClientRepository},
|
||||
Repository,
|
||||
Clock, Repository,
|
||||
};
|
||||
use mas_storage_pg::PgRepository;
|
||||
use mas_templates::{ConsentContext, PolicyViolationContext, TemplateContext, Templates};
|
||||
|
||||
@@ -25,7 +25,7 @@ use mas_storage::{
|
||||
compat::{CompatAccessTokenRepository, CompatRefreshTokenRepository, CompatSessionRepository},
|
||||
oauth2::{OAuth2AccessTokenRepository, OAuth2RefreshTokenRepository, OAuth2SessionRepository},
|
||||
user::{BrowserSessionRepository, UserRepository},
|
||||
Clock, Repository,
|
||||
Clock, Repository, SystemClock,
|
||||
};
|
||||
use mas_storage_pg::PgRepository;
|
||||
use oauth2_types::{
|
||||
@@ -130,7 +130,7 @@ pub(crate) async fn post(
|
||||
State(encrypter): State<Encrypter>,
|
||||
client_authorization: ClientAuthorization<IntrospectionRequest>,
|
||||
) -> Result<impl IntoResponse, RouteError> {
|
||||
let clock = Clock::default();
|
||||
let clock = SystemClock::default();
|
||||
let mut repo = PgRepository::from_pool(&pool).await?;
|
||||
|
||||
let client = client_authorization
|
||||
|
||||
@@ -37,7 +37,7 @@ use mas_storage::{
|
||||
OAuth2RefreshTokenRepository, OAuth2SessionRepository,
|
||||
},
|
||||
user::BrowserSessionRepository,
|
||||
Repository,
|
||||
Clock, Repository,
|
||||
};
|
||||
use mas_storage_pg::PgRepository;
|
||||
use oauth2_types::{
|
||||
|
||||
@@ -31,7 +31,7 @@ use mas_router::UrlBuilder;
|
||||
use mas_storage::{
|
||||
oauth2::OAuth2ClientRepository,
|
||||
user::{BrowserSessionRepository, UserEmailRepository},
|
||||
Repository,
|
||||
Clock, Repository,
|
||||
};
|
||||
use mas_storage_pg::PgRepository;
|
||||
use oauth2_types::scope;
|
||||
|
||||
Reference in New Issue
Block a user