Fix jsonwebtoken update issue
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user