[package]
name = "hearth-sdk"
version = "1.4.0"
edition = "2021"
description = "Hearth identity platform Rust SDK"
license = "MIT"
repository = "https://github.com/hearth-auth/hearth"
homepage = "https://github.com/hearth-auth/hearth"
documentation = "https://docs.rs/hearth-sdk"

[workspace]

[features]
## Enables the Tower middleware ([`middleware::RequirePermissionLayer`]).
## Adds `tower` and `http` as dependencies.
tower-middleware = ["dep:tower", "dep:http"]
## Enables the Actix-web middleware ([`actix::HearthActixMiddleware`]) and
## [`actix::RequirePermission`] extractor.
## Adds `actix-web` as a dependency.
actix-middleware = ["dep:actix-web"]

[dependencies]
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
base64 = "0.22"
uuid = { version = "1", features = ["serde"] }
thiserror = "2"
jsonwebtoken = { version = "10", features = ["rust_crypto"] }
sha2 = "0.10"
rand = "0.8"
tokio = { version = "1", features = ["sync", "time"] }
tower = { version = "0.4", optional = true }
http = { version = "1", optional = true }
actix-web = { version = "4", optional = true }

[dev-dependencies]
tokio = { version = "1", features = ["full"] }
ring = "0.17"
actix-web = "4"
