Fix jsonwebtoken update issue
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-11-03 18:52:10 +01:00
parent 4a31deacdc
commit e2e828db65
3 changed files with 303 additions and 87 deletions

View File

@@ -67,7 +67,7 @@ impl JWTPrivateKey {
impl JWTPublicKey {
/// Validate a given JWT
pub fn validate_jwt<E: DeserializeOwned>(&self, jwt: &str) -> anyhow::Result<E> {
pub fn validate_jwt<E: DeserializeOwned + Clone>(&self, jwt: &str) -> anyhow::Result<E> {
match self {
JWTPublicKey::ES384 { public } => {
let decoding_key = DecodingKey::from_ec_pem(public.as_bytes())?;
@@ -93,7 +93,7 @@ mod test {
.as_secs()
}
#[derive(Debug, Serialize, Deserialize, Eq, PartialEq)]
#[derive(Debug, Serialize, Deserialize, Eq, PartialEq, Clone)]
pub struct Claims {
sub: String,
exp: u64,