Update validation.rs (#176)
This commit is contained in:
parent
6f05ec9a1a
commit
9fd9db55cd
|
@ -159,7 +159,7 @@ pub fn validate(claims: &Map<String, Value>, options: &Validation) -> Result<()>
|
|||
}
|
||||
Value::Array(_) => {
|
||||
let provided_aud: HashSet<String> = from_value(aud.clone())?;
|
||||
if provided_aud.intersection(correct_aud).count() == 0 {
|
||||
if provided_aud.intersection(correct_aud).next().is_none() {
|
||||
return Err(new_error(ErrorKind::InvalidAudience));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue