# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
name = "athena-auth"
version = "1.12.0"
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Authentication framework from Athena"
readme = "README.md"
license = "MIT"
repository = "https://github.com/xylex-group/athena-auth"
resolver = "2"

[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",
]

[lib]
name = "athena_auth"
path = "src/lib.rs"

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

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

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

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

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

[[test]]
name = "admin_role_lifecycle_tests"
path = "tests/admin_role_lifecycle_tests.rs"

[[test]]
name = "axum_integration_tests"
path = "tests/axum_integration_tests.rs"

[[test]]
name = "axum_route_matrix_tests"
path = "tests/axum_route_matrix_tests.rs"

[[test]]
name = "compat_admin_tests"
path = "tests/compat_admin_tests.rs"

[[test]]
name = "compat_consistency_tests"
path = "tests/compat_consistency_tests.rs"

[[test]]
name = "compat_coverage_tests"
path = "tests/compat_coverage_tests.rs"

[[test]]
name = "compat_endpoint_tests"
path = "tests/compat_endpoint_tests.rs"

[[test]]
name = "compat_field_tests"
path = "tests/compat_field_tests.rs"

[[test]]
name = "compat_organization_tests"
path = "tests/compat_organization_tests.rs"

[[test]]
name = "compat_passkey_tests"
path = "tests/compat_passkey_tests.rs"

[[test]]
name = "compat_unit_tests"
path = "tests/compat_unit_tests.rs"

[[test]]
name = "compatibility_tests"
path = "tests/compatibility_tests.rs"

[[test]]
name = "derive_tests"
path = "tests/derive_tests.rs"

[[test]]
name = "dual_server_benchmark_tests"
path = "tests/dual_server_benchmark_tests.rs"

[[test]]
name = "dual_server_tests"
path = "tests/dual_server_tests.rs"

[[test]]
name = "integration_tests"
path = "tests/integration_tests.rs"

[[test]]
name = "meta_trait_tests"
path = "tests/meta_trait_tests.rs"

[[test]]
name = "phase0_tests"
path = "tests/phase0_tests.rs"

[[test]]
name = "property_tests"
path = "tests/property_tests.rs"

[[test]]
name = "server_http_dual_tests"
path = "tests/server_http_dual_tests.rs"

[[test]]
name = "snapshot_tests"
path = "tests/snapshot_tests.rs"

[dependencies.argon2]
version = "0.5"

[dependencies.async-trait]
version = "0.1"

[dependencies.athena-auth-api]
version = "1.10.0"

[dependencies.athena-auth-core]
version = "1.0.0"

[dependencies.athena-auth-multitenancy]
version = "1.0.0"

[dependencies.athena-auth-observability]
version = "1.0.0"
optional = true

[dependencies.axum]
version = "0.8"
optional = true

[dependencies.base64]
version = "0.22"

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

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

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

[dependencies.jsonwebtoken]
version = "9"

[dependencies.rand]
version = "0.8"

[dependencies.redis]
version = "0.27"
optional = true

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

[dependencies.serde_json]
version = "1.0"

[dependencies.serde_yaml]
version = "0.9"

[dependencies.sha2]
version = "0.10"

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

[dependencies.thiserror]
version = "2.0"

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

[dependencies.tower]
version = "0.5"
optional = true

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

[dependencies.tracing]
version = "0.1"

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

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

[dependencies.url]
version = "2"
optional = true

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

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

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

[dev-dependencies.proptest]
version = "1.10.0"

[dev-dependencies.reqwest]
version = "0.12"
features = [
    "json",
    "rustls-tls",
]
default-features = false

[dev-dependencies.serde_yaml]
version = "0.9"

[dev-dependencies.tokio]
version = "1.0"
features = [
    "full",
    "test-util",
]

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

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

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

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

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