From 222fe39b84374a1d9981cdfd9abf1a6eb577b33b Mon Sep 17 00:00:00 2001 From: hwdev Date: Fri, 20 Nov 2026 19:26:10 +0000 Subject: [PATCH] [Authlib] get_header_zip() and get_claim_cls_by_response_type() can return 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. --- stubs/Authlib/authlib/jose/rfc7516/jwe.pyi | 2 +- stubs/Authlib/authlib/oidc/core/claims.pyi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stubs/Authlib/authlib/jose/rfc7516/jwe.pyi b/stubs/Authlib/authlib/jose/rfc7516/jwe.pyi index c0783698a279..dd73ff4eecb4 100644 --- a/stubs/Authlib/authlib/jose/rfc7516/jwe.pyi +++ b/stubs/Authlib/authlib/jose/rfc7516/jwe.pyi @@ -29,6 +29,6 @@ class JsonWebEncryption: def parse_json(obj) -> dict[Incomplete, Incomplete]: ... def get_header_alg(self, header) -> JWEAlgorithmBase: ... def get_header_enc(self, header) -> JWEEncAlgorithm: ... - def get_header_zip(self, header) -> JWEZipAlgorithm: ... + def get_header_zip(self, header) -> JWEZipAlgorithm | None: ... def prepare_key(alg, header, key): ... diff --git a/stubs/Authlib/authlib/oidc/core/claims.pyi b/stubs/Authlib/authlib/oidc/core/claims.pyi index f9a24cfbcfa6..e0f86f9e5437 100644 --- a/stubs/Authlib/authlib/oidc/core/claims.pyi +++ b/stubs/Authlib/authlib/oidc/core/claims.pyi @@ -33,4 +33,4 @@ class UserInfo(dict[str, object]): def filter(self, scope: str) -> UserInfo: ... def __getattr__(self, key): ... -def get_claim_cls_by_response_type(response_type) -> type: ... +def get_claim_cls_by_response_type(response_type) -> type | None: ...