Skip to main content

session_cookie

Function session_cookie 

Source
pub fn session_cookie(
    token: &SessionToken,
    config: &SessionConfig,
    domain: &str,
) -> String
Expand description

Build a Set-Cookie header value for the given session token.

Attributes: HttpOnly, SameSite=Lax, Path=/, Max-Age derived from config.ttl. The Secure attribute is added only when config.secure is true. The Domain attribute is omitted when domain is empty.