rs_firebase_admin_sdk/auth/token/
error.rs1use thiserror::Error;
2
3#[derive(Error, Debug, Clone)]
4pub enum TokenVerificationError {
5 #[error("Error happened while parsing the token")]
6 FailedParsing,
7 #[error("Error happened while fetching public keys")]
8 FailedGettingKeys,
9 #[error("Invalid key for token's signature")]
10 InvalidSignatureKey,
11 #[error("Invalid token's signature")]
12 InvalidSignature,
13 #[error("Invalid token's signature algorithm")]
14 InvalidSignatureAlgorithm,
15 #[error("Token is expired")]
16 Expired,
17 #[error("Token was issued in the future")]
18 IssuedInFuture,
19 #[error("Token has invalid audience")]
20 InvalidAudience,
21 #[error("Token has invalid issuer")]
22 InvalidIssuer,
23 #[error("Token has empty subject")]
24 MissingSubject,
25}