Skip to content

Commit c592679

Browse files
committed
chore: deprecate insecure_disable_signature_validation
Add deprecated attribute to `Validation::insecure_disable_signature_validation`
1 parent e9a5fe4 commit c592679

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/validation.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,10 @@ impl Validation {
156156
/// Whether to validate the JWT cryptographic signature.
157157
/// Disabling validation is dangerous, only do it if you know what you're doing.
158158
/// With validation disabled you should not trust any of the values of the claims.
159+
#[deprecated(
160+
since = "10.0.0",
161+
note = "Use `jsonwebtoken::dangerous::insecure_decode` if you require this functionality."
162+
)]
159163
pub fn insecure_disable_signature_validation(&mut self) {
160164
self.validate_signature = false;
161165
}

tests/hmac.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(deprecated)]
12
use serde::{Deserialize, Serialize};
23
use std::collections::HashMap;
34
use time::OffsetDateTime;

0 commit comments

Comments
 (0)