1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//! # nucleus-rs
//!
//! Rust backend SDK for [Nucleus](https://nucleus.dev) authentication.
//!
//! Provides JWT verification with JWKS caching, an admin API client for managing
//! users and organisations, and optional middleware for Axum and Actix-web.
//!
//! ## Quick start
//!
//! ```rust,no_run
//! use nucleus_rs::{NucleusClient, NucleusConfig};
//!
//! #[tokio::main]
//! async fn main() {
//! let client = NucleusClient::new(NucleusConfig {
//! secret_key: "sk_live_...".into(),
//! base_url: None,
//! jwks_cache_ttl_secs: None,
//! });
//!
//! let claims = client.verify_token("eyJ...").await.unwrap();
//! println!("user id: {}", claims.user_id());
//! }
//! ```
//!
//! ## Features
//!
//! | Feature | Description |
//! |---------|-------------|
//! | `axum` | Adds [`axum::NucleusLayer`] and [`axum::NucleusClaims`] extractor |
//! | `actix` | Adds [`actix::NucleusClaims`] extractor for Actix-web |
pub const VERSION: &str = env!;
// Re-exports for convenience.
pub use NucleusClaims;
pub use ;
pub use NucleusError;