Skip to content

[Authlib] get_header_zip() and get_claim_cls_by_response_type() can return None - #16883

Merged
srittau merged 1 commit into
python:mainfrom
hnwg:authlib-lookups-can-return-none
Nov 22, 2026
Merged

srittau merged 1 commit into
python:mainfrom
hnwg:authlib-lookups-can-return-none

Conversation

@hnwg

@hnwg hnwg commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

If no zip member exists in the header, JsonWebEncryption.get_header_zip() returns None. If the given response type isn't listed by any of CodeIDToken, ImplicitIDToken or HybridIDToken, get_claim_cls_by_response_type() returns None.

>>> from authlib.oidc.core.claims import get_claim_cls_by_response_type
>>> print(get_claim_cls_by_response_type("token"))
None

…eturn None

JsonWebEncryption.get_header_zip() returns None when the header has no
zip member, and get_claim_cls_by_response_type() returns None for a
response type that no ID token class lists.
@github-actions

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@srittau
srittau merged commit b473eac into python:main Nov 22, 2026
74 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