1mod actix;
2mod claims;
3mod config;
4mod decode;
5mod encode;
6mod key;
7
8pub use claims::Jwt;
9pub use config::JwtConfig;
10pub use decode::JwtDecode;
11pub use encode::JwtEncode;
12
13pub use jsonwebtoken::Algorithm;
14
15mod errors {
16 use std::io;
17
18 pub(crate) fn invalid_input<E>(error: E) -> io::Error
19 where
20 E: Into<Box<dyn std::error::Error + Send + Sync>>,
21 {
22 io::Error::new(io::ErrorKind::InvalidInput, error)
23 }
24
25 pub(crate) fn invalid_data<E>(error: E) -> io::Error
26 where
27 E: Into<Box<dyn std::error::Error + Send + Sync>>,
28 {
29 io::Error::new(io::ErrorKind::InvalidData, error)
30 }
31}