Skip to main content

encode_compact

Function encode_compact 

Source
pub fn encode_compact(
    user: &UserView,
    session: &SessionView,
    version: &str,
    now_ms: i64,
    max_age: f64,
    dont_remember: bool,
    secret: &str,
) -> AuthResult<String>
Expand description

Encode the already-filtered canonical output.

Infinite or out-of-range expiry becomes JSON null, as for an invalid JavaScript Date; the reader rejects that envelope instead of pretending that it expires normally.