You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-11-21 23:00:50 +03:00
Dedicated HTTP server/client crate
Also have better names for the HTTP routes
This commit is contained in:
@@ -20,6 +20,7 @@ use mas_templates::{ReauthContext, TemplateContext, Templates};
|
||||
use mas_warp_utils::{
|
||||
errors::WrapError,
|
||||
filters::{
|
||||
self,
|
||||
cookies::{encrypted_cookie_saver, EncryptedCookieSaver},
|
||||
csrf::{protected_form, updated_csrf_token},
|
||||
database::{connection, transaction},
|
||||
@@ -87,6 +88,7 @@ pub(super) fn filter(
|
||||
csrf_config: &CsrfConfig,
|
||||
) -> BoxedFilter<(Box<dyn Reply>,)> {
|
||||
let get = warp::get()
|
||||
.and(filters::trace::name("GET /reauth"))
|
||||
.and(with_templates(templates))
|
||||
.and(connection(pool))
|
||||
.and(encrypted_cookie_saver(encrypter))
|
||||
@@ -96,6 +98,7 @@ pub(super) fn filter(
|
||||
.and_then(get);
|
||||
|
||||
let post = warp::post()
|
||||
.and(filters::trace::name("POST /reauth"))
|
||||
.and(session(pool, encrypter))
|
||||
.and(transaction(pool))
|
||||
.and(protected_form(encrypter))
|
||||
|
||||
Reference in New Issue
Block a user