MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / generate_session_id

Function generate_session_id

nodedb/src/control/security/auth_context.rs:328–330  ·  view source on GitHub ↗

Generate a cryptographically random session ID (`s_<128-bit hex>`). Used as `$auth.session_id` in RLS predicates and as the audit correlation key — must be unguessable.

()

Source from the content-addressed store, hash-verified

326/// Used as `$auth.session_id` in RLS predicates and as the audit
327/// correlation key — must be unguessable.
328pub fn generate_session_id() -> String {
329 super::random::generate_tagged_random_hex("s_")
330}
331
332#[cfg(test)]
333mod tests {

Callers 7

ctxFunction · 0.85
resolve_authFunction · 0.85
build_auth_contextFunction · 0.85
nodedb_auth_ctxFunction · 0.85

Calls 1