# 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 = "pas-external"
version = "4.0.2"
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Ppoppo Accounts System (PAS) external SDK -- OAuth2 PKCE, PASETO verification, Axum middleware, session liveness"
homepage = "https://accounts.ppoppo.com"
documentation = "https://docs.rs/pas-external"
readme = "README.md"
keywords = [
    "oauth2",
    "pkce",
    "paseto",
    "axum",
    "authentication",
]
categories = [
    "authentication",
    "web-programming",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/hakchin/ppoppo-sdk"
resolver = "2"

[features]
axum = [
    "oauth",
    "session-liveness",
    "dep:axum",
    "dep:axum-extra",
    "dep:tracing",
    "dep:urlencoding",
]
default = [
    "oauth",
    "token",
]
oauth = [
    "dep:reqwest",
    "dep:sha2",
    "dep:rand",
    "dep:base64",
    "dep:url",
    "dep:tokio",
    "dep:async-trait",
]
session-liveness = [
    "oauth",
    "dep:aes-gcm",
    "dep:base64",
]
token = [
    "dep:pasetors",
    "dep:hex",
    "dep:base64",
]
well-known-fetch = [
    "oauth",
    "token",
    "dep:tokio",
]

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

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

[dependencies.aes-gcm]
version = "0.10"
features = ["aes"]
optional = true

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

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

[dependencies.axum-extra]
version = "0.12"
features = ["cookie-private"]
optional = true

[dependencies.base64]
version = "0.22"
optional = true

[dependencies.derive_more]
version = "2"
features = [
    "display",
    "from_str",
    "from",
    "into",
]
default-features = false

[dependencies.hex]
version = "0.4"
optional = true

[dependencies.pasetors]
version = "0.7"
features = [
    "v4",
    "std",
]
optional = true
default-features = false

[dependencies.rand]
version = "0.10"
optional = true

[dependencies.reqwest]
version = "0.13"
features = [
    "json",
    "form",
    "rustls",
]
optional = true
default-features = false

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

[dependencies.serde_json]
version = "1"

[dependencies.sha2]
version = "0.11"
optional = true

[dependencies.thiserror]
version = "2"

[dependencies.time]
version = "0.3"
features = [
    "serde",
    "serde-well-known",
    "parsing",
]

[dependencies.tokio]
version = "1"
features = ["sync"]
optional = true
default-features = false

[dependencies.tracing]
version = "0.1"
optional = true

[dependencies.ulid]
version = "1"
features = ["serde"]

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

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

[dev-dependencies.static_assertions]
version = "1"

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

[lints.clippy]
expect_used = "deny"
panic = "deny"
unwrap_used = "deny"

[lints.rust]
unsafe_code = "forbid"
