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

Fully document the mas_core::filters module

This commit is contained in:
Quentin Gliech
2021-09-23 20:53:51 +02:00
parent 2cfaff737e
commit 3bf86c4b21
10 changed files with 62 additions and 12 deletions

View File

@@ -22,7 +22,7 @@ use crate::{
config::{OAuth2ClientConfig, OAuth2Config},
errors::WrapError,
filters::{
client::{with_client_auth, ClientAuthentication},
client::{client_authentication, ClientAuthentication},
database::connection,
},
storage::oauth2::{access_token::lookup_access_token, refresh_token::lookup_refresh_token},
@@ -36,7 +36,7 @@ pub fn filter(
warp::path!("oauth2" / "introspect")
.and(warp::post())
.and(connection(pool))
.and(with_client_auth(oauth2_config))
.and(client_authentication(oauth2_config))
.and_then(introspect)
.recover(recover)
}

View File

@@ -40,7 +40,7 @@ use crate::{
config::{KeySet, OAuth2ClientConfig, OAuth2Config},
errors::WrapError,
filters::{
client::{with_client_auth, ClientAuthentication},
client::{client_authentication, ClientAuthentication},
database::connection,
with_keys,
},
@@ -91,7 +91,7 @@ pub fn filter(
let issuer = oauth2_config.issuer.clone();
warp::path!("oauth2" / "token")
.and(warp::post())
.and(with_client_auth(oauth2_config))
.and(client_authentication(oauth2_config))
.and(with_keys(oauth2_config))
.and(warp::any().map(move || issuer.clone()))
.and(connection(pool))