Skip to main content

generate_token

Function generate_token 

Source
pub fn generate_token() -> String
Expand description

Mint a random per-session bearer token (32 bytes, hex-encoded) for the HTTP transport, when the operator hasn’t configured a fixed capabilities.server.token. Uses getrandom (already resolved transitively via reqwest’s rustls/ring stack; promoted to a direct dependency here so this crate can call it directly, rather than rolling a hand-written PRNG for a value that must actually be unguessable).