linked client to session.

This commit is contained in:
2025-04-07 00:41:28 -04:00
parent d8623f9691
commit f9f64dae55
6 changed files with 75 additions and 44 deletions

View File

@ -43,7 +43,7 @@ async fn mtt_conn(jar: CookieJar, state: State<MoreThanText>) -> impl IntoRespon
tx.send(state.clone().request(sid)).await.unwrap();
});
let reply = rx.recv().await.unwrap();
let cookie = Cookie::build((SESSION_KEY, reply.get_session()));
let cookie = Cookie::build((SESSION_KEY, reply.get_session().to_string()));
let cookies = jar.add(cookie);
/*
@ -81,7 +81,6 @@ mod servers {
assert!(sessid.contains(SESSION_KEY), "did not set session id");
}
/*
#[tokio::test]
async fn session_ids_are_unique() {
let app = mtt_conn.with_state(MoreThanText::new());
@ -101,5 +100,4 @@ mod servers {
holder.push(sessid);
}
}
*/
}