Expand description

CSRF middleware for Savlo web server 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.

Structs

AesGcmCipheraes-gcm-cipher
AesGcmCipher is a CSRF protection implementation that uses HMAC.
BcryptCipherbcrypt-cipher
BcryptCipher is a CSRF protection implementation that uses bcrypt.
CcpCipherccp-cipher
CcpCipher is a CSRF protection implementation that uses HMAC.
CookieStorecookie-store
CookieStore is a CsrfStore implementation that stores the CSRF secret in a cookie.
Cross-Site Request Forgery (CSRF) protection middleware.
Find token from request form body.
Find token from http request header.
HmacCipherhmac-cipher
HmacCipher is a CSRF protection implementation that uses HMAC.
Find token from request json body.
Find token from http request url query string.
SessionStoresession-store
CookieStore is a CsrfStore implementation that stores the CSRF secret in a session.

Constants

key used to insert auth decoded data to depot.

Traits

Generate secret and token and valid token.
Extesion for Depot.
Store secret.
CsrfTokenFinder

Functions

aes_gcm_cookie_csrfaes-gcm-cipher and cookie-store
Helper function to create a Csrf use AesGcmCipher and CookieStore.
aes_gcm_csrfaes-gcm-cipher
Helper function to create a Csrf use AesGcmCipher.
aes_gcm_session_csrfaes-gcm-cipher and session-store
Helper function to create a Csrf use AesGcmCipher and SessionStore.
bcrypt_cookie_csrfbcrypt-cipher and cookie-store
Helper function to create a Csrf use BcryptCipher and CookieStore.
bcrypt_csrfbcrypt-cipher
Helper function to create a Csrf use BcryptCipher.
bcrypt_session_csrfbcrypt-cipher and session-store
Helper function to create a Csrf use BcryptCipher and SessionStore.
ccp_cookie_csrfccp-cipher and cookie-store
Helper function to create a Csrf use CcpCipher and CookieStore.
ccp_csrfccp-cipher
Helper function to create a Csrf use CcpCipher.
ccp_session_csrfccp-cipher and session-store
Helper function to create a Csrf use CcpCipher and SessionStore.
cookie_storecookie-store
Helper function to create a CookieStore.
hmac_cookie_csrfhmac-cipher and cookie-store
Helper function to create a Csrf use HmacCipher and CookieStore.
hmac_csrfhmac-cipher
Helper function to create a Csrf use HmacCipher.
hmac_session_csrfhmac-cipher and session-store
Helper function to create a Csrf use HmacCipher and SessionStore.
session_storesession-store
Helper function to create a SessionStore.