diff --git a/zenith_utils/src/auth.rs b/zenith_utils/src/auth.rs index 3ab1d0d9b1..274dd13bee 100644 --- a/zenith_utils/src/auth.rs +++ b/zenith_utils/src/auth.rs @@ -85,7 +85,6 @@ pub fn check_permission(claims: &Claims, tenantid: Option) -> Result< } } -#[derive(Debug)] pub struct JwtAuth { decoding_key: DecodingKey<'static>, validation: Validation, @@ -113,6 +112,14 @@ impl JwtAuth { } } +impl std::fmt::Debug for JwtAuth { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("JwtAuth") + .field("validation", &self.validation) + .finish() + } +} + // this function is used only for testing purposes in CLI e g generate tokens during init pub fn encode_from_key_file(claims: &Claims, key_data: &[u8]) -> Result { let key = EncodingKey::from_rsa_pem(key_data)?;