Put match variant behind feature flag

Without the keystore feature, this variant is not available.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
This commit is contained in:
Kévin Commaille
2024-03-19 12:13:35 +01:00
committed by Quentin Gliech
parent 34d8132114
commit 099eabd137
@@ -21,9 +21,10 @@ use chrono::{DateTime, Duration, Utc};
use headers::{Authorization, HeaderMapExt};
use http::Request;
use mas_iana::{jose::JsonWebSignatureAlg, oauth::OAuthClientAuthenticationMethod};
#[cfg(feature = "keystore")]
use mas_jose::constraints::Constrainable;
use mas_jose::{
claims::{self, ClaimError},
constraints::Constrainable,
jwa::SymmetricKey,
jwt::{JsonWebSignatureHeader, Jwt},
};
@@ -101,6 +102,7 @@ impl JwtSigningMethod {
pub fn jwt_custom(&self) -> Option<&JwtSigningFn> {
match self {
JwtSigningMethod::Custom(s) => Some(s.as_ref()),
#[cfg(feature = "keystore")]
JwtSigningMethod::Keystore(_) => None,
}
}