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

Clean up some warp filters and add documentation

This commit is contained in:
Quentin Gliech
2021-09-23 14:02:44 +02:00
parent 9cd7dec070
commit 29126e336e
25 changed files with 196 additions and 109 deletions

View File

@@ -23,7 +23,7 @@ use crate::{
errors::WrapError,
filters::{
client::{with_client_auth, ClientAuthentication},
database::with_connection,
database::connection,
},
storage::oauth2::{access_token::lookup_access_token, refresh_token::lookup_refresh_token},
tokens,
@@ -35,7 +35,7 @@ pub fn filter(
) -> impl Filter<Extract = (impl Reply,), Error = Rejection> + Clone + Send + Sync + 'static {
warp::path!("oauth2" / "introspect")
.and(warp::post())
.and(with_connection(pool))
.and(connection(pool))
.and(with_client_auth(oauth2_config))
.and_then(introspect)
.recover(recover)