Skip to content

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

Open
hnwg wants to merge 1 commit into
python:mainfrom
hnwg:authlib-lookups-can-return-none
Open

hnwg wants to merge 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. 🤖🎉

This branch has not been deployed

No deployments
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.

1 participant