Skip to main content

IdSource

Trait IdSource 

Source
pub trait IdSource: Send + Sync {
    // Required method
    fn next_id(&self) -> Result<RefreshJti>;
}
Expand description

Supplies unpredictable refresh IDs in production and deterministic IDs in tests.

Required Methods§

Source

fn next_id(&self) -> Result<RefreshJti>

Generates the next refresh identifier.

§Errors

Returns a mechanism error when generation fails. Production sources must supply unique, unpredictable values; stores must also enforce JTI uniqueness.

Implementors§