[package]
edition = "2024"
rust-version = "1.85"
name = "sa-token-storage-database"
version = "0.2.0"
authors = ["金书记"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Database storage implementation for sa-token-rust (sqlx + PostgreSQL)"
homepage = "https://github.com/sa-tokens/sa-token-rust.git"
documentation = "https://docs.rs/sa-token-rust"
readme = "README.md"
keywords = [
"authentication",
"authorization",
"token",
"security",
"web",
]
categories = [
"authentication",
"web-programming",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/sa-tokens/sa-token-rust.git"
[package.metadata.docs.rs]
features = ["postgres"]
no-default-features = false
rustdoc-args = [
"--cfg",
"docsrs",
]
[features]
default = ["postgres"]
mysql = ["sqlx/mysql"]
postgres = ["sqlx/postgres"]
[lib]
name = "sa_token_storage_database"
path = "src/lib.rs"
[dependencies.async-trait]
version = "0.1"
[dependencies.chrono]
version = "0.4.44"
features = ["serde"]
[dependencies.sa-token-adapter]
version = "0.2.0"
[dependencies.sqlx]
version = "0.8.6"
features = [
"runtime-tokio",
"macros",
"chrono",
]
default-features = false
[dependencies.thiserror]
version = "2.0.18"
[dependencies.tokio]
version = "1.52.3"
features = ["full"]
[dev-dependencies.sa-token-core]
version = "0.2.0"
[lints.clippy]
dbg_macro = "deny"
expect_used = "warn"
float_cmp = "deny"
indexing_slicing = "warn"
mem_forget = "deny"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
module_name_repetitions = "allow"
must_use_candidate = "allow"
panic = "warn"
print_stderr = "deny"
print_stdout = "deny"
todo = "deny"
too_many_lines = "allow"
unimplemented = "deny"
unwrap_in_result = "warn"
unwrap_used = "warn"
[lints.clippy.all]
level = "warn"
priority = -1
[lints.clippy.pedantic]
level = "allow"
priority = -1
[lints.rust]
missing_debug_implementations = "warn"
missing_docs = "warn"
unreachable_pub = "warn"
unsafe_code = "forbid"
unused_lifetimes = "deny"
unused_must_use = "deny"
unused_qualifications = "warn"
[lints.rust.rust_2018_idioms]
level = "warn"
priority = -1