Skip to content

Commit e5892f3

Browse files
committed
fix: disable audience validation if it was not passed in options
1 parent d5c1ece commit e5892f3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/jsonwebtoken/src/validation.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ impl From<&Validation> for jsonwebtoken::Validation {
6161

6262
if let Some(aud) = &value.aud {
6363
validation.set_audience(aud);
64+
} else {
65+
validation.validate_aud = false;
6466
}
6567
if let Some(required_spec_claims) = &value.required_spec_claims {
6668
validation.set_required_spec_claims(required_spec_claims);

0 commit comments

Comments
 (0)