Expand description
CSRF middleware for Salvo web framework.
CSRF middleware for Salvo that provides CSRF (Cross-Site Request Forgery) protection.
Data can be saved in Cookies via CookieStore or in session
via SessionStore. SessionStore need to work with salvo-session crate.
Read more: https://salvo.rs
Structs§
- AesGcm
Cipher aes-gcm-cipher - CSRF protection implementation that uses AES-GCM.
- Bcrypt
Cipher bcrypt-cipher - CSRF protection implementation that uses bcrypt.
- CcpCipher
ccp-cipher - CcpCipher is a CSRF protection implementation that uses
ChaCha20Poly1305. - Cookie
Store cookie-store - A
CsrfStoreimplementation that stores the CSRF proof in a cookie. - Csrf
- Cross-Site Request Forgery (CSRF) protection middleware.
- Form
Finder - Find token from request form body.
- Header
Finder - Find token from http request header.
- Hmac
Cipher hmac-cipher - A CSRF protection implementation that uses HMAC.
- Json
Finder - Find token from request json body.
- Session
Store session-store - A
CsrfStoreimplementation that stores the CSRF proof in a session.
Constants§
- CSRF_
TOKEN_ KEY - key used to insert auth decoded data to depot.
Traits§
- Csrf
Cipher - Generate token and proof and valid token.
- Csrf
Depot Ext - Extension for Depot.
- Csrf
Store - Store proof.
- Csrf
Token Finder - Used to find csrf token from request.
Functions§
- aes_
gcm_ cookie_ csrf aes-gcm-cipherandcookie-store - Helper function to create a
CsrfuseAesGcmCipherandCookieStore. - aes_
gcm_ csrf aes-gcm-cipher - Helper function to create a
CsrfuseAesGcmCipher. - aes_
gcm_ session_ csrf aes-gcm-cipherandsession-store - Helper function to create a
CsrfuseAesGcmCipherandSessionStore. - bcrypt_
cookie_ csrf bcrypt-cipherandcookie-store - Helper function to create a
CsrfuseBcryptCipherandCookieStore. - bcrypt_
csrf bcrypt-cipher - Helper function to create a
CsrfuseBcryptCipher. - bcrypt_
session_ csrf bcrypt-cipherandsession-store - Helper function to create a
CsrfuseBcryptCipherandSessionStore. - ccp_
cookie_ csrf ccp-cipherandcookie-store - Helper function to create a
CsrfuseCcpCipherandCookieStore. - ccp_
csrf ccp-cipher - Helper function to create a
CsrfuseCcpCipher. - ccp_
session_ csrf ccp-cipherandsession-store - Helper function to create a
CsrfuseCcpCipherandSessionStore. - cookie_
store cookie-store - Helper function to create a
CookieStore. - hmac_
cookie_ csrf hmac-cipherandcookie-store - Helper function to create a
CsrfuseHmacCipherandCookieStore. - hmac_
csrf hmac-cipher - Helper function to create a
CsrfuseHmacCipher. - hmac_
session_ csrf hmac-cipherandsession-store - Helper function to create a
CsrfuseHmacCipherandSessionStore. - session_
store session-store - Helper function to create a
SessionStore.