[[bin]]
name = "sync_better_auth_openapi"
path = "scripts/sync_better_auth_openapi.rs"

[[bin]]
name = "openapi_alignment_report"
path = "scripts/openapi_alignment_report.rs"

[[bin]]
name = "server"
path = "src/bin/server.rs"
required-features = ["server"]

[dependencies]
serde_yaml = "0.9"

[dependencies.argon2]
workspace = true

[dependencies.async-trait]
workspace = true

[dependencies.athena-auth-api]
workspace = true

[dependencies.athena-auth-core]
workspace = true

[dependencies.athena-auth-multitenancy]
workspace = true

[dependencies.athena-auth-observability]
optional = true
workspace = true

[dependencies.axum]
optional = true
workspace = true

[dependencies.base64]
workspace = true

[dependencies.chrono]
workspace = true

[dependencies.clap]
features = ["derive"]
version = "4.5"

[dependencies.dotenvy]
optional = true
version = "0.15"

[dependencies.jsonwebtoken]
workspace = true

[dependencies.rand]
workspace = true

[dependencies.redis]
optional = true
workspace = true

[dependencies.serde]
workspace = true

[dependencies.serde_json]
workspace = true

[dependencies.sha2]
workspace = true

[dependencies.sqlx]
optional = true
workspace = true

[dependencies.thiserror]
workspace = true

[dependencies.tokio]
features = [
    "macros",
    "net",
    "rt-multi-thread",
    "time",
]
optional = true
workspace = true

[dependencies.tower]
optional = true
workspace = true

[dependencies.tower-http]
features = [
    "cors",
    "fs",
]
optional = true
version = "0.6"

[dependencies.tracing]
workspace = true

[dependencies.tracing-loki]
optional = true
version = "0.2"

[dependencies.tracing-subscriber]
optional = true
workspace = true

[dependencies.url]
optional = true
workspace = true

[dependencies.uuid]
workspace = true

[dev-dependencies]
proptest = "1.10.0"
serde_yaml = "0.9"

[dev-dependencies.insta]
features = ["yaml"]
version = "1.46.3"

[dev-dependencies.oas3]
features = ["yaml-spec"]
version = "0.20.1"

[dev-dependencies.reqwest]
features = ["rustls-tls"]
workspace = true

[dev-dependencies.tokio]
features = [
    "full",
    "test-util",
]
workspace = true

[dev-dependencies.totp-rs]
workspace = true

[dev-dependencies.tower-http]
features = [
    "cors",
    "fs",
]
version = "0.6"

[dev-dependencies.tracing-subscriber]
workspace = true

[[example]]
name = "auth_builder_minimal"
path = "examples/auth_builder_minimal.rs"

[[example]]
name = "auth_core_ok"
path = "examples/auth_core_ok.rs"

[features]
axum = [
    "dep:axum",
    "dep:tower",
    "dep:url",
]
default = [
    "redis-cache",
    "smtp",
    "derive",
    "sqlx-postgres",
    "axum",
]
derive = ["athena-auth-core/derive"]
redis-cache = ["dep:redis"]
server = [
    "axum",
    "sqlx-postgres",
    "smtp",
    "dep:dotenvy",
    "dep:athena-auth-observability",
    "dep:tokio",
    "dep:tracing-loki",
    "dep:tracing-subscriber",
    "dep:tower-http",
]
smtp = ["athena-auth-core/smtp"]
sqlx-postgres = [
    "dep:sqlx",
    "athena-auth-core/sqlx-postgres",
]

[package]
description = "Authentication framework from Athena"
name = "athena-auth"
version = "1.12.0"

[package.edition]
workspace = true

[package.license]
workspace = true

[package.repository]
workspace = true

[profile.ci]
codegen-units = 16
inherits = "release"
lto = "thin"
opt-level = 2

[profile.release]
codegen-units = 1
debug = false
incremental = false
lto = "fat"
opt-level = 3
panic = "abort"
strip = true

[workspace]
exclude = [
    "examples/sqlx-custom-entities",
    "examples/sea-orm-migration",
    "examples/fullstack/backend",
]
members = [
    "crates/core",
    "crates/api",
    "crates/caching-matrix",
    "crates/derive",
    "crates/multitenancy",
    "crates/observability",
]
resolver = "2"

[workspace.dependencies]
aes-gcm = "0.10"
argon2 = "0.5"
async-trait = "0.1"
aws-credential-types = "1"
axum = "0.8"
base64 = "0.22"
cookie = "0.18"
hkdf = "0.12"
hmac = "0.12"
jsonwebtoken = "9"
proc-macro2 = "1"
quote = "1"
rand = "0.8"
redis = "0.27"
serde_json = "1.0"
sha2 = "0.10"
thiserror = "2.0"
tower = "0.5"
tracing = "0.1"
url = "2"

[workspace.dependencies.athena-auth-api]
path = "crates/api"
version = "1.10.0"

[workspace.dependencies.athena-auth-core]
path = "crates/core"
version = "1.0.0"

[workspace.dependencies.athena-auth-derive]
path = "crates/derive"
version = "1.0.0"

[workspace.dependencies.athena-auth-multitenancy]
path = "crates/multitenancy"
version = "1.0.0"

[workspace.dependencies.athena-auth-observability]
path = "crates/observability"
version = "1.0.0"

[workspace.dependencies.aws-config]
default-features = false
features = [
    "rt-tokio",
    "rustls",
]
version = "1"

[workspace.dependencies.aws-sdk-s3]
default-features = false
features = [
    "rt-tokio",
    "rustls",
]
version = "1"

[workspace.dependencies.caching-matrix]
path = "crates/caching-matrix"
version = "1.0.0"

[workspace.dependencies.chrono]
features = ["serde"]
version = "0.4"

[workspace.dependencies.moka]
features = ["sync"]
version = "0.12"

[workspace.dependencies.reqwest]
default-features = false
features = ["json"]
version = "0.12"

[workspace.dependencies.serde]
features = ["derive"]
version = "1.0"

[workspace.dependencies.sqlx]
features = [
    "runtime-tokio-rustls",
    "postgres",
    "chrono",
    "uuid",
    "json",
]
version = "0.8"

[workspace.dependencies.syn]
features = ["full"]
version = "2"

[workspace.dependencies.tokio]
version = "1.0"

[workspace.dependencies.totp-rs]
features = [
    "gen_secret",
    "otpauth",
]
version = "5"

[workspace.dependencies.tracing-subscriber]
features = [
    "env-filter",
    "json",
]
version = "0.3"

[workspace.dependencies.uuid]
features = [
    "js",
    "v4",
    "v7",
    "serde",
]
version = "1.18"

[workspace.dependencies.validator]
features = ["derive"]
version = "0.19"

[workspace.package]
edition = "2024"
license = "MIT"
repository = "https://github.com/xylex-group/athena-auth"
version = "1.9.4"
