Implement logout, renaming sessions::Cookie to sessions::Sesssion
This commit is contained in:
parent
f5946e5ea0
commit
70b417865f
4 changed files with 178 additions and 37 deletions
|
|
@ -8,12 +8,14 @@ use crate::state::RoutableAppState;
|
|||
|
||||
mod index;
|
||||
mod login;
|
||||
mod logout;
|
||||
|
||||
/// Build a router for the application, in a specific subpath eg `/yunohost/sso/`
|
||||
pub fn router(subpath: Option<String>, state: RoutableAppState) -> Router {
|
||||
let app = Router::new()
|
||||
.route("/", get(index::route))
|
||||
.route("/login/", post(login::route))
|
||||
.route("/logout/", get(logout::route))
|
||||
.layer(CookieManagerLayer::new())
|
||||
.with_state(state);
|
||||
if let Some(p) = subpath {
|
||||
|
|
|
|||
Loading…
Reference in a new issue