alibi-core 0.8.0

Shared authentication contracts and backend-independent services for Alibi
Documentation
1
2
3
4
5
6
7
8
9
10
11
//! Session identifiers shared by SQL stores and the in-memory test store.
use rand::RngExt;

/// Generate the pinned upstream session-token shape using operating-system entropy.
pub fn generate_session_token() -> String {
    rand::rng()
        .sample_iter(rand::distr::Alphanumeric)
        .take(32)
        .map(char::from)
        .collect()
}