Skip to main content

token

Function token 

Source
pub async fn token(session: &Session) -> String
Expand description

Returns the current session’s CSRF token, generating and storing one on first use. Read this to embed the token in a form (the @csrf directive does this automatically for templates that pass csrf_token in their view! context).