Refactor comments and update session identity logic

Revised comments for clarity in main.rs and session_identify.rs. Included an explanatory note about using third-party hosts for signature verification. Removed an unused `.toak-ignore` file.
This commit is contained in:
geoffsee
2025-05-23 09:56:47 -04:00
parent 66d3c06230
commit 6420efc68a
3 changed files with 3 additions and 4 deletions

View File

@@ -1,3 +0,0 @@
package.json
genaisrc/genaiscript.d.ts
.toak-ignore

View File

@@ -17,7 +17,7 @@ async fn main() {
// Initialize logging
init_logging();
// Load configuration
// init server configuration
let config = AppConfig::new();
// Create router with all routes

View File

@@ -14,6 +14,8 @@ pub struct SessionIdentity {
pub user: Value
}
// for a production setup, use a 3rd party host to verify the signature
// I removed in this version because the identity server I built is not open source yet
pub async fn session_identify(session_token: &str) -> Result<SessionIdentity> {
let session_data_base64 = session_token.split('.').nth(0).ok_or_else(|| anyhow::anyhow!("Invalid session data format"))?;
// println!("session_data_base64: {}", session_data_base64);