Skip to content

Commit 917e45d

Browse files
Merge #729
729: Let users chose what crypto backend of jsonwebtoken to use r=curquiza a=LukasKalbertodt # Pull Request ## What does this PR do? `jsonwebtoken` was updated to 10.x in #717, but there, `aws_lc_rs` was unconditionally enabled. While I also prefer that backend, this library should probably leave the choice to users. I think my PR achieves exactly that, while still defaulting to aws_lc_rs. ## PR checklist Please check if your PR fulfills the following requirements: - [x] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)? - [x] Have you read the contributing guidelines? - [x] Have you made sure that the title is accurate and descriptive of the changes? Thank you so much for contributing to Meilisearch! <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated jsonwebtoken dependency to v10.2.0. * Enhanced WASM32 support by expanding UUID handling. * **New Features** * Added selectable JWT cryptographic backend feature flags (AWS-LC and Rust-Crypto). * Default feature set now includes AWS-LC cryptographic support. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Lukas Kalbertodt <[email protected]>
2 parents 5757ec4 + cc25ab7 commit 917e45d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Cargo.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ futures-channel = "0.3.31"
3333
futures-util = { version = "0.3.31", default-features = false, features = ["io"] }
3434

3535
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
36-
jsonwebtoken = { version = "10.0.0", default-features = false, features = ["aws_lc_rs"]}
36+
jsonwebtoken = { version = "10.2.0", default-features = false }
3737
tokio = { version = "1.38", optional = true, features = ["time"] }
3838

3939
[target.'cfg(target_arch = "wasm32")'.dependencies]
@@ -42,10 +42,12 @@ web-sys = "0.3.77"
4242
wasm-bindgen-futures = "0.4"
4343

4444
[features]
45-
default = ["reqwest", "tls"]
45+
default = ["reqwest", "tls", "jwt_aws_lc_rs"]
4646
reqwest = ["dep:reqwest", "dep:tokio", "pin-project-lite", "bytes"]
4747
tls = ["reqwest/rustls-tls"]
4848
futures-unsend = []
49+
jwt_aws_lc_rs = ["jsonwebtoken/aws_lc_rs"]
50+
jwt_rust_crypto = ["jsonwebtoken/rust_crypto"]
4951

5052
[dev-dependencies]
5153
futures-await-test = "0.3"

src/tenant_tokens.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use time::OffsetDateTime;
66
#[cfg(not(target_arch = "wasm32"))]
77
use uuid::Uuid;
88

9-
#[cfg_attr(test, derive(Clone))]
109
#[derive(Debug, Serialize, Deserialize)]
1110
#[serde(rename_all = "camelCase")]
1211
struct TenantTokenClaim {

0 commit comments

Comments
 (0)