Skip to content

fix(jwt): report correct claim name for invalid iss - #105

Merged
lepture merged 1 commit into
authlib:mainfrom
janmrow:fix/jwt-iss-claim-name
Sep 8, 2026
Merged

fix(jwt): report correct claim name for invalid iss#105
lepture merged 1 commit into
authlib:mainfrom
janmrow:fix/jwt-iss-claim-name

Conversation

@janmrow

@janmrow janmrow commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

JWTClaimsRegistry.validate_iss currently reports "str" instead of "iss" when the iss claim has an invalid type.

This PR fixes the reported claim name and error description. Making it consistent with the sub and aud validators.

The existing iss validation test now also checks the reported claim name and description.

Tests on the local machine:

  • pytest tests/ -q
  • ruff format --check src/joserfc/_rfc7519/claims.py tests/jwt/test_claims.py
  • mypy src/joserfc/_rfc7519/claims.py

@codecov

codecov Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (357c319) to head (eec6d5e).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #105   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           47        47           
  Lines         2945      2945           
  Branches       350       350           
=========================================
  Hits          2945      2945           
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lepture
lepture merged commit 8074dc7 into authlib:main Sep 8, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants