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

Axum migration: logout route

This commit is contained in:
Quentin Gliech
2022-03-25 15:50:28 +01:00
parent 5e95c705d4
commit 6e7d0a6cfd
5 changed files with 59 additions and 37 deletions

View File

@@ -21,7 +21,12 @@
use std::sync::Arc;
use axum::{body::HttpBody, extract::Extension, routing::get, Router};
use axum::{
body::HttpBody,
extract::Extension,
routing::{get, post},
Router,
};
use mas_axum_utils::UrlBuilder;
use mas_config::{Encrypter, RootConfig};
use mas_email::Mailer;
@@ -81,6 +86,7 @@ where
"/login",
get(self::views::login::get).post(self::views::login::post),
)
.route("/logout", post(self::views::logout::post))
.fallback(mas_static_files::Assets)
.layer(Extension(pool.clone()))
.layer(Extension(templates.clone()))