1use thiserror::Error;
4
5#[derive(Debug, Error)]
7pub enum AuthError {
8 #[error("invalid credentials: {0}")]
10 InvalidCredentials(String),
11
12 #[error("authentication failed: {0}")]
14 AuthenticationFailed(String),
15
16 #[error("token expired or invalid")]
18 TokenExpired,
19
20 #[error("failed to acquire token: {0}")]
22 TokenAcquisition(String),
23
24 #[error("unsupported authentication method: {0}")]
26 UnsupportedMethod(String),
27
28 #[error("SSPI error: {0}")]
30 Sspi(String),
31
32 #[error("certificate error: {0}")]
34 Certificate(String),
35
36 #[error("network error: {0}")]
38 Network(String),
39
40 #[error("configuration error: {0}")]
42 Configuration(String),
43
44 #[error("Azure identity error: {0}")]
46 AzureIdentity(String),
47}