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

data-model: simplify the oauth2 clients

This commit is contained in:
Quentin Gliech
2022-12-07 14:46:08 +01:00
parent 6d82199910
commit 92d6f5b087
12 changed files with 46 additions and 80 deletions

View File

@ -43,7 +43,7 @@ use mas_storage::{
RefreshTokenLookupError,
},
},
DatabaseInconsistencyError, LookupError, PostgresqlBackend,
DatabaseInconsistencyError, LookupError,
};
use oauth2_types::{
errors::{ClientError, ClientErrorCode},
@ -239,7 +239,7 @@ pub(crate) async fn post(
#[allow(clippy::too_many_lines)]
async fn authorization_code_grant(
grant: &AuthorizationCodeGrant,
client: &Client<PostgresqlBackend>,
client: &Client,
key_store: &Keystore,
url_builder: &UrlBuilder,
mut txn: Transaction<'_, Postgres>,
@ -391,7 +391,7 @@ async fn authorization_code_grant(
async fn refresh_token_grant(
grant: &RefreshTokenGrant,
client: &Client<PostgresqlBackend>,
client: &Client,
mut txn: Transaction<'_, Postgres>,
) -> Result<AccessTokenResponse, RouteError> {
let (clock, mut rng) = crate::rng_and_clock()?;