[package]
edition = "2024"
rust-version = "1.94"
name = "salvo-csrf"
version = "0.96.0"
authors = ["chrislearn <chris@acroidea.com>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = """
CSRF support for salvo web server framework.
"""
homepage = "https://salvo.rs"
readme = "README.md"
keywords = [
"http",
"async",
"web",
"framework",
"server",
]
categories = [
"web-programming::http-server",
"web-programming::websocket",
"network-programming",
"asynchronous",
]
license = "Apache-2.0"
repository = "https://github.com/salvo-rs/salvo"
[package.metadata.docs.rs]
all-features = true
rustdoc-args = [
"--cfg",
"docsrs",
]
[features]
aes-gcm-cipher = [
"dep:aead",
"dep:aes-gcm",
"dep:subtle",
]
bcrypt-cipher = ["dep:bcrypt"]
ccp-cipher = [
"dep:aead",
"dep:chacha20poly1305",
"dep:subtle",
]
cookie-store = [
"salvo_core/cookie",
"dep:cookie",
]
default = [
"cookie-store",
"bcrypt-cipher",
]
full = [
"cookie-store",
"session-store",
"bcrypt-cipher",
"hmac-cipher",
"aes-gcm-cipher",
"ccp-cipher",
]
hmac-cipher = [
"dep:hmac",
"dep:sha2",
]
session-store = ["dep:salvo-session"]
[lib]
name = "salvo_csrf"
path = "src/lib.rs"
[dependencies.aead]
version = "0.6"
optional = true
[dependencies.aes-gcm]
version = "0.11"
optional = true
[dependencies.base64]
version = "0.23"
[dependencies.bcrypt]
version = "0.19"
optional = true
[dependencies.chacha20poly1305]
version = "0.11"
optional = true
[dependencies.cookie]
version = "0.18"
features = [
"percent-encode",
"signed",
]
optional = true
[dependencies.hmac]
version = "0.13"
optional = true
[dependencies.rand]
version = "0.10"
[dependencies.salvo-session]
version = "0.96.0"
optional = true
default-features = false
[dependencies.salvo_core]
version = "0.96.0"
default-features = false
[dependencies.serde_json]
version = "1"
[dependencies.sha2]
version = "0.11"
optional = true
[dependencies.subtle]
version = "2"
optional = true
[dependencies.tracing]
version = "0.1"
[dev-dependencies.salvo_core]
version = "0.96.0"
features = ["test"]
default-features = false
[dev-dependencies.tokio]
version = "1"
features = [
"macros",
"rt-multi-thread",
]
[lints.clippy]
await_holding_lock = "warn"
dbg_macro = "warn"
empty_enums = "warn"
enum_glob_use = "warn"
equatable_if_let = "warn"
exit = "warn"
filter_map_next = "warn"
fn_params_excessive_bools = "warn"
future_not_send = "warn"
if_let_mutex = "warn"
implicit_clone = "warn"
imprecise_flops = "warn"
inefficient_to_string = "warn"
linkedlist = "warn"
lossy_float_literal = "warn"
macro_use_imports = "warn"
manual_let_else = "warn"
mem_forget = "warn"
must_use_candidate = "warn"
needless_borrow = "warn"
needless_continue = "warn"
needless_pass_by_ref_mut = "warn"
option_option = "warn"
redundant_clone = "warn"
ref_option = "warn"
rest_pat_in_fully_bound_structs = "warn"
return_self_not_must_use = "warn"
single_match_else = "warn"
str_to_string = "warn"
suboptimal_flops = "warn"
todo = "warn"
trivially_copy_pass_by_ref = "warn"
type_complexity = "allow"
uninlined_format_args = "warn"
unnested_or_patterns = "warn"
unused_self = "warn"
unwrap_used = "warn"
use_self = "warn"
[lints.rust]
missing_debug_implementations = "warn"
missing_docs = "warn"
unreachable_pub = "deny"
unsafe_code = "forbid"
[lints.rustdoc]
broken_intra_doc_links = "warn"