1#[derive(Debug, thiserror::Error, PartialEq, Eq)]
3pub enum Error {
4 #[error("invalid authentication configuration or claims")]
5 InvalidInput,
6 #[error("duplicate key id")]
7 DuplicateKey,
8 #[error("active key is missing")]
9 MissingActiveKey,
10 #[error("operating system randomness unavailable")]
11 Randomness,
12 #[error("invalid token")]
13 InvalidToken,
14 #[error("token exceeds the wire size limit")]
15 TokenTooLarge,
16 #[error("token expired")]
17 Expired,
18 #[error("token is not yet valid")]
19 NotYetValid,
20 #[error("required capability missing")]
21 MissingCapability,
22 #[error("token revoked")]
23 Revoked,
24 #[error("token already consumed")]
25 Replayed,
26 #[error("validation policy unavailable")]
27 PolicyUnavailable,
28 #[error("authentication state table is full")]
29 StateFull,
30 #[error("authentication table has an incompatible layout")]
31 IncompatibleLayout,
32 #[error("authentication table uses a different state protection policy")]
33 IncompatibleProtection,
34}
35
36pub type Result<T> = std::result::Result<T, Error>;