Module csrf

Source
Expand description

Re-exports the csrf crate.

Structs§

AesGcmCsrfProtection
Uses AES-GCM to provide signed, encrypted CSRF tokens and cookies.
ChaCha20Poly1305CsrfProtection
Uses ChaCha20Poly1305 to provide signed, encrypted CSRF tokens and cookies.
CsrfCookie
A signed, encrypted CSRF cookie that is suitable to be displayed to end users.
CsrfToken
A signed, encrypted CSRF token that is suitable to be displayed to end users.
HmacCsrfProtection
Uses HMAC to provide authenticated CSRF tokens and cookies.
MultiCsrfProtection
This is used when one wants to rotate keys or switch from implementation to another. It accepts 1 + N instances of CsrfProtection and uses only the first to generate tokens and cookies. The N remaining instances are used only for parsing.
UnencryptedCsrfCookie
Internal represenation of an unencrypted CSRF cookie. This is not suitable to send to end users.
UnencryptedCsrfToken
Internal represenation of an unencrypted CSRF token. This is not suitable to send to end users.

Enums§

CsrfError
An enum of all CSRF related errors.

Traits§

CsrfProtection
The base trait that allows a developer to add CSRF protection to an application.