Skip to content

Commit ec14da0

Browse files
authored
fix(jsonwebtoken): disable audience validation if it was not passed in options (#910)
1 parent d5c1ece commit ec14da0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/jsonwebtoken/src/validation.rs

+2
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)