1#![cfg_attr(docsrs, feature(doc_auto_cfg))]
2#![cfg_attr(all(feature = "rsa", feature = "fmt"), doc = include_str!("../README.md"))]
3#![cfg_attr(
4 not(all(feature = "rsa", feature = "fmt")),
5 doc = "# JAWS: JSON Web tokens
6
7JSON Web Tokens are used to send signed, authenticated and/or encrypted data using
8a JavaScript Object Notation (JSON) object. This crate provides a strongly typed
9interface for creating and validating [JWTs][JWT], built on top of the [RustCrypto][]
10ecosystem.
11
12
13[RustCrypto]: https://github.com/RustCrypto
14[JWT]: https://tools.ietf.org/html/rfc7519
15"
16)]
17#![deny(unsafe_code)]
41#![deny(missing_docs)]
42#![deny(clippy::self_named_module_files)]
43#![deny(clippy::dbg_macro)]
44
45pub mod algorithms;
46pub mod base64data;
47pub mod claims;
48
49#[cfg(feature = "fmt")]
50pub mod fmt;
51
52pub mod jose;
53pub mod key;
54mod numeric_date;
55pub mod token;
56
57pub use algorithms::{SignatureBytes, TokenSigner, TokenVerifier};
58pub use claims::{Claims, RegisteredClaims};
59#[cfg(feature = "fmt")]
60pub use fmt::JWTFormat;
61pub use token::Token;
62pub use token::{Compact, Flat, FlatUnprotected};
63
64pub mod crypto {
68 pub use digest;
69 #[cfg(feature = "ecdsa")]
70 pub use ecdsa;
71 #[cfg(feature = "p256")]
72 pub use p256;
73 #[cfg(feature = "p384")]
74 pub use p384;
75 #[cfg(feature = "p521")]
76 pub use p521;
77 pub use pkcs8;
78 #[cfg(feature = "rand")]
79 pub use rand_core;
80 #[cfg(feature = "rsa")]
81 pub use rsa;
82 pub use sha2;
83 pub use signature;
84}