Skip to content

Commit

Permalink
feat: add Send + Sync to Verify and Sign
Browse files Browse the repository at this point in the history
  • Loading branch information
nanderstabel committed Jun 22, 2023
1 parent 1ca7a20 commit cc374a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion siopv2/src/authentication/sign.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use anyhow::Result;
use async_trait::async_trait;

#[async_trait]
pub trait Sign {
pub trait Sign: Send + Sync {
// TODO: add this?
// fn jwt_alg_name() -> &'static str;
fn key_id(&self) -> Option<String>;
Expand Down
2 changes: 1 addition & 1 deletion siopv2/src/authentication/verify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ use async_trait::async_trait;

/// This [`Verify`] trait is used to verify JWTs.
#[async_trait]
pub trait Verify: Sync {
pub trait Verify: Send + Sync {
async fn public_key(&self, kid: &str) -> Result<Vec<u8>>;
}

0 comments on commit cc374a3

Please sign in to comment.