mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-13 21:42:34 +00:00
frontend: Add button to log out
This commit is contained in:
@@ -16,7 +16,7 @@ use oidc::{route_get_oidc, route_get_oidc_callback};
|
||||
use routes::{
|
||||
addressbook::{route_addressbook, route_addressbook_restore},
|
||||
calendar::{route_calendar, route_calendar_restore},
|
||||
login::{route_get_login, route_post_login},
|
||||
login::{route_get_login, route_post_login, route_post_logout},
|
||||
};
|
||||
use rustical_store::{
|
||||
Addressbook, AddressbookStore, Calendar, CalendarStore,
|
||||
@@ -162,6 +162,11 @@ pub fn configure_frontend<AP: AuthenticationProvider, CS: CalendarStore, AS: Add
|
||||
.route(web::method(Method::GET).to(route_get_login))
|
||||
.route(web::method(Method::POST).to(route_post_login::<AP>)),
|
||||
)
|
||||
.service(
|
||||
web::resource("/logout")
|
||||
.name("frontend_logout")
|
||||
.route(web::method(Method::POST).to(route_post_logout)),
|
||||
)
|
||||
.service(
|
||||
web::resource("/login/oidc")
|
||||
.name("frontend_login_oidc")
|
||||
|
||||
Reference in New Issue
Block a user