fastauth 0.2.0

Authentication for Rust web apps, modelled on Better Auth: sessions, email and password, plugins checked by the compiler.
Documentation
# 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"
rust-version = "1.94"
name = "fastauth"
version = "0.2.0"
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Authentication for Rust web apps, modelled on Better Auth: sessions, email and password, plugins checked by the compiler."
readme = "README.md"
keywords = [
    "auth",
    "authentication",
    "axum",
    "sqlx",
    "session",
]
categories = [
    "authentication",
    "web-programming",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/lassejlv/fastauth"

[package.metadata.docs.rs]
all-features = true

[features]
admin = ["dep:fastauth-plugin-admin"]
api-key = ["dep:fastauth-plugin-api-key"]
axum = [
    "dep:fastauth-axum",
    "fastauth-core/axum",
    "fastauth-plugin-organization?/axum",
    "fastauth-plugin-admin?/axum",
]
cli = [
    "dep:anyhow",
    "dep:clap",
    "dep:dotenvy",
    "dep:fastauth-sqlx",
    "dep:time",
]
default = [
    "axum",
    "postgres",
    "macros",
]
macros = ["fastauth-core/macros"]
oauth = [
    "dep:fastauth-oauth",
    "fastauth-oauth/reqwest",
]
organization = ["dep:fastauth-plugin-organization"]
postgres = [
    "dep:fastauth-sqlx",
    "fastauth-sqlx/postgres",
]
sqlite = [
    "dep:fastauth-sqlx",
    "fastauth-sqlx/sqlite",
]
two-factor = ["dep:fastauth-plugin-two-factor"]

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

[[example]]
name = "axum_memory"
path = "examples/axum_memory.rs"
required-features = ["axum"]

[[example]]
name = "axum_sqlite"
path = "examples/axum_sqlite.rs"
required-features = [
    "axum",
    "sqlite",
    "macros",
    "two-factor",
    "organization",
    "admin",
    "api-key",
]

[[example]]
name = "cli_sqlite"
path = "examples/cli_sqlite.rs"
required-features = [
    "cli",
    "sqlite",
    "macros",
    "two-factor",
]

[[test]]
name = "cli"
path = "tests/cli.rs"
required-features = [
    "cli",
    "sqlite",
    "macros",
]

[dependencies.anyhow]
version = "1.0.104"
optional = true

[dependencies.clap]
version = "4.6.10"
features = [
    "derive",
    "env",
]
optional = true

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

[dependencies.fastauth-axum]
version = "0.2.0"
optional = true

[dependencies.fastauth-core]
version = "0.2.0"

[dependencies.fastauth-oauth]
version = "0.2.0"
optional = true
default-features = false

[dependencies.fastauth-plugin-admin]
version = "0.2.0"
optional = true

[dependencies.fastauth-plugin-api-key]
version = "0.2.0"
optional = true

[dependencies.fastauth-plugin-organization]
version = "0.2.0"
optional = true

[dependencies.fastauth-plugin-two-factor]
version = "0.2.0"
optional = true

[dependencies.fastauth-sqlx]
version = "0.2.0"
optional = true
default-features = false

[dependencies.time]
version = "0.3.45"
features = [
    "formatting",
    "macros",
]
optional = true

[dev-dependencies.axum]
version = "0.8.9"

[dev-dependencies.serde]
version = "1.0.229"
features = ["derive"]

[dev-dependencies.tempfile]
version = "3.27.0"

[dev-dependencies.tokio]
version = "1.54.1"
features = [
    "macros",
    "net",
    "rt-multi-thread",
]

[dev-dependencies.tracing-subscriber]
version = "0.3.23"

[lints.clippy.all]
level = "warn"
priority = -1

[lints.rust]
missing_debug_implementations = "allow"
unsafe_code = "forbid"