tsk-51: Changes made related to icarus_models

This commit is contained in:
2025-08-06 18:51:14 -04:00
parent cd2b624e4c
commit 41796fd768
2 changed files with 6 additions and 4 deletions

View File

@@ -78,7 +78,7 @@ pub mod endpoint {
if hashing::verify_password(&payload.password, user.password.clone()).unwrap() {
// Create token
let key = icarus_envy::environment::get_secret_key().await;
let (token_literal, duration) = token_stuff::create_token(&key).unwrap();
let (token_literal, duration) = token_stuff::create_token(&key, &user.id).unwrap();
if token_stuff::verify_token(&key, &token_literal) {
let current_time = time::OffsetDateTime::now_utc();
@@ -122,7 +122,7 @@ pub mod endpoint {
match repo::service::valid_passphrase(&pool, &payload.passphrase).await {
Ok((id, _passphrase, _date_created)) => {
let key = icarus_envy::environment::get_secret_key().await;
let (token_literal, duration) = token_stuff::create_service_token(&key).unwrap();
let (token_literal, duration) = token_stuff::create_service_token(&key, &id).unwrap();
if token_stuff::verify_token(&key, &token_literal) {
let login_result = icarus_models::login_result::LoginResult {