backbone-auth 3.7.0

Backbone Framework Auth - Authentication and authorization system
Documentation
[package]
name = "backbone-auth"
version = "3.7.0"
edition = "2021"
description = "Backbone Framework Auth - Authentication and authorization system"
license = "MIT OR Apache-2.0"
repository = "https://github.com/faridlab/backbone-framework"
autoexamples = false

[dependencies]
# Core dependencies
tokio = { version = "1.0", features = ["full"] }
async-trait = "0.1"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
uuid = { version = "1.0", features = ["v4", "serde"] }
chrono = { version = "0.4", features = ["serde"] }

# Authentication
jsonwebtoken = "9.0"
argon2 = "0.5"

# HTTP tenant guard (feature `axum`) — optional so non-HTTP consumers don't pull axum.
axum = { version = "0.7", optional = true }
# The company guard sets the request's company scope (backbone-orm's task-local) so the RLS read
# fence (ADR-0008) returns the caller's rows. Only the HTTP guard needs it → gated behind `axum`.
backbone-orm = { path = "../backbone-orm", version = "3.7.0", optional = true }
# Idempotency-Key dedup table (idempotency middleware) — gated behind `axum`.
sqlx = { version = "0.8", features = ["runtime-tokio-rustls", "postgres", "uuid"], optional = true }

# Error handling
anyhow = "1.0"
thiserror = "1.0"

# Logging
tracing = "0.1"

# Crypto
ring = "0.17"
sha2 = "0.10"

# Random number generation
rand = "0.8"

# Validation
regex = "1.0"

# Email validation
email_address = "0.2"

# Secret memory protection
zeroize = { version = "1", features = ["zeroize_derive"] }

[features]
default = []
# The HTTP tenant guard: `TenantContext` / `TenantVerifier` / `tenant_auth`.
# Off by default — only a crate that serves HTTP needs axum.
axum = ["dep:axum", "dep:backbone-orm", "dep:sqlx"]

[dev-dependencies]
# `ServiceExt::oneshot` — drives the real router in-process in tests/tenant_guard.rs.
tower = { version = "0.5", features = ["util"] }