You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-11-24 23:01:05 +03:00
Axum migration: /account/* routes
This commit is contained in:
@@ -76,9 +76,11 @@ pub trait SessionInfoExt {
|
||||
impl<K> SessionInfoExt for PrivateCookieJar<K> {
|
||||
fn session_info(self) -> (SessionInfo, Self) {
|
||||
let jar = self;
|
||||
let cookie = jar
|
||||
let mut cookie = jar
|
||||
.get("session")
|
||||
.unwrap_or_else(|| Cookie::new("session", ""));
|
||||
cookie.set_path("/");
|
||||
cookie.set_http_only(true);
|
||||
let session_info = cookie.decode().unwrap_or_default();
|
||||
|
||||
let cookie = cookie.encode(&session_info);
|
||||
|
||||
Reference in New Issue
Block a user