[package]
name = "jose"
version = "0.0.1"
edition = "2021"
license = "MIT OR Apache-2.0"
rust-version = "1.84"
authors = [
  "Erik Tesar <erik@erik-tesar.com>",
  "Justus K. <justus.k@protonmail.com>",
]
description = "A JSON Object Signing and Encryption implementation"
readme = "README.md"
homepage = "https://github.com/minkan-chat/jose"
repository = "https://github.com/minkan-chat/jose.git"
keywords = ["jwt", "JsonWebToken", "json", "jose", "authentication"]
categories = [
  "cryptography",
  "encoding",
  "parser-implementations",
  "no-std",
  "authentication",
]

[features]
default = []
std = [
  "signature/std",
  "thiserror-no-std/std",
  "rsa/std",
  "rand_core/std",
  "fluent-uri/std",
  "serde_json/std",
]

[dependencies]
thiserror-no-std = "2.0.2"
base64ct = { version = "1.5", default-features = false, features = ["alloc"] }
serde = { version = "1", default-features = false, features = [
  "alloc",
  "derive",
] }
serde_json = { version = "1", default-features = false, features = ["alloc"] }
hashbrown = { version = "0.15", features = ["serde"] }
rand_core = { version = "0.6", features = ["getrandom", "alloc"] }
hmac = { version = "0.12", default-features = false }
sha1 = { version = "0.10", default-features = false, features = ["oid"] }
sha2 = { version = "0.10", default-features = false, features = ["oid"] }
ed25519 = { version = "2.2.1", default-features = false, features = ["alloc"] }
p256 = { version = "0.13", default-features = false, features = [
  "arithmetic",
  "ecdsa",
] }
p384 = { version = "0.13", default-features = false, features = [
  "arithmetic",
  "ecdsa",
] }
k256 = { version = "0.13", default-features = false, features = [
  "arithmetic",
  "ecdsa",
] }
elliptic-curve = { version = "0.13", default-features = false, features = [
  "arithmetic",
  "jwk",
  "serde",
  "sec1",
  "pkcs8",
  "pem",
] }

rsa = { version = "0.9", default-features = false }
digest = { version = "0.10.7", default-features = false, features = ["mac"] }
ecdsa = { version = "0.16", default-features = false, features = [
  "digest",
  "signing",
  "verifying",
  "alloc",
] }

ed25519-dalek = { version = "2", default-features = false, features = [
  "zeroize",
  "rand_core",
] }

signature = { version = "2.1.0", default-features = false }
# FIXME: remove this when we can use const generics
generic-array = { version = "0.14", default-features = false, features = [
  "serde",
] }

typenum = { version = "1.15", default-features = false, features = ["no_std"] }
num-traits = { version = "0.2.15", default-features = false }
num-bigint-dig = { version = "0.8.1", default-features = false, features = [
  "u64_digit",
] }
serde-value = { version = "0.7.0", default-features = false }

# a replacement for the `mime` crate from hyper which seems to be no longer maintained
mediatype = { version = "0.19.3", features = ["serde"] }
fluent-uri = { version = "0.3.2", default-features = false }
secrecy = { version = "0.10.3", default-features = false, features = ["serde"] }
zeroize = { version = "1.8.1", default-features = false, features = ["derive", "serde"] }

[dev-dependencies]
rand = "0.8.5"

# For examples
eyre = "0.6.12"
clap = { version = "4.5.27", features = ["derive"] }
clio = { version = "0.3.5", features = ["clap-parse"] }

# For X.509 certificates of Json Web Keys
# x509-cert = { git = "https://github.com/RustCrypto/formats.git" }

[[example]]
name = "basic-jwt"
required-features = ["std"]
