feat: gpauth support macos

This commit is contained in:
Kevin Yue committed 2025-01-09 21:22:41 +08:00
1 parent 0c9b8e6c63
commit d37ccafdc2
53 files changed
+1423 -1042

No files matched your search

+7 -4
View File
@@ -4,10 +4,13 @@ use thiserror::Error;
pub enum PortalError {
#[error("Prelogin error: {0}")]
PreloginError(String),
#[error("Portal config error: {0}")]
ConfigError(String),
#[error("Network error: {0}")]
#[error(transparent)]
NetworkError(#[from] reqwest::Error),
#[error("TLS error")]
TlsError,
}
@@ -26,12 +29,12 @@ impl PortalError {
pub enum AuthDataParseError {
#[error("No auth data found")]
NotFound,
#[error("Invalid auth data")]
Invalid,
#[error(transparent)]
Invalid(#[from] anyhow::Error),
}
impl AuthDataParseError {
pub fn is_invalid(&self) -> bool {
matches!(self, AuthDataParseError::Invalid)
matches!(self, AuthDataParseError::Invalid(_))
}
}