diff --git a/Cargo.toml b/Cargo.toml index e06201b..541132f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,7 +42,7 @@ path = "src/setpassword.rs" [dependencies] nickel = ">= 0.8.1" -nickel-jwt-session = "*" +nickel-jwt-session = "^0.4" env_logger = "*" log = "*" chrono = "*" diff --git a/src/main.rs b/src/main.rs index 5a8cc57..658204e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -152,7 +152,7 @@ fn main() { fn login<'mw>(_req: &mut Request, mut res: Response<'mw>) -> MiddlewareResult<'mw> { - res.clear_jwt_user(); + res.clear_jwt(); render!(res, "templates/login.tpl", {}) } @@ -184,7 +184,7 @@ fn do_login<'mw>(req: &mut Request, fn logout<'mw>(_req: &mut Request, mut res: Response<'mw>) -> MiddlewareResult<'mw> { - res.clear_jwt_user(); + res.clear_jwt(); res.redirect("/") }