Skip to content

Commit

Permalink
Merge pull request #12 from rjw57/fix-verifier-error
Browse files Browse the repository at this point in the history
fix: when claims have incorrect values, correctly report the invalid value
  • Loading branch information
rjw57 authored Nov 20, 2024
2 parents 8ed1121 + 757abce commit e1a5868
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion federatedidentity/_verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,6 @@ def _verify_claims(claims: dict[str, Any], required_claims: Optional[Iterable[Cl
raise InvalidClaimsError(f"Required claim '{claim}' not present in token")
if claims[claim] != value:
raise InvalidClaimsError(
f"Required claim '{claim}' has invalid value {value!r}"
f"Required claim '{claim}' has invalid value {claims[claim]!r}. "
f"Expected {value!r}."
)

0 comments on commit e1a5868

Please sign in to comment.