Files
alknet/crates/alknet-core/Cargo.toml
glm-5.2 8dc842b1f4 feat(core): implement AuthContext, Identity, AuthToken, IdentityProvider, ConfigIdentityProvider (task: core/auth)
- auth.rs: Identity, AuthContext, AuthToken, IdentityProvider trait, ConfigIdentityProvider
- ConfigIdentityProvider reads from ArcSwap<DynamicConfig> on every call (hot-reloadable)
- Fingerprint resolution via authorized_fingerprints; token resolution via alk_ prefix + SHA-256 hash + expiry check
- config.rs: minimal DynamicConfig, AuthPolicy (with resolve methods), ApiKeyEntry, RateLimitConfig, ConfigReloadHandle required by auth
- Unit tests: fingerprint resolution (known/unknown/empty), token resolution (valid/expired/unknown/wrong-hash/non-alk), config reload changes results immediately
- Add sha2, hex deps to alknet-core
2026-06-23 14:08:33 +00:00

34 lines
832 B
TOML

[package]
name = "alknet-core"
version.workspace = true
edition.workspace = true
license.workspace = true
description = "Core library for ALPN-based protocol dispatch: ProtocolHandler trait, Connection, auth, config, and multi-connectivity endpoint"
repository.workspace = true
[lib]
name = "alknet_core"
[features]
default = ["quinn"]
quinn = ["dep:quinn"]
iroh = ["dep:iroh"]
[dependencies]
tokio = { version = "1", features = ["full"] }
quinn = { version = "0.11", optional = true }
iroh = { version = "0.35", optional = true }
rustls = "0.23"
rustls-pki-types = "1"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
toml = "0.8"
arc-swap = "1"
async-trait = "0.1"
tracing = "0.1"
thiserror = "2"
zeroize = { version = "1", features = ["alloc", "derive"] }
bytes = "1"
futures = "0.3"
sha2 = "0.10"
hex = "0.4"