Skip to content

Commit d3776a9

Browse files
style: ruff autofix (auto)
1 parent 1ad4e93 commit d3776a9

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

src/utils/jwt_verification.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,7 @@ def _validate_ms_issuer(issuer: str, token_tid: str, signing_key_issuer: str) ->
240240
)
241241
if tid_in_iss and tid_in_iss != token_tid:
242242
raise InvalidIssuerError(
243-
f"Tenant ID in issuer URL {tid_in_iss!r} does not match "
244-
f"tid claim {token_tid!r}"
243+
f"Tenant ID in issuer URL {tid_in_iss!r} does not match tid claim {token_tid!r}"
245244
)
246245

247246

@@ -351,9 +350,7 @@ def verify_microsoft_access_token(
351350
if not kid:
352351
raise JWTVerificationError("Token header missing 'kid' field")
353352

354-
signing_key_entry = next(
355-
(k for k in jwks.get("keys", []) if k.get("kid") == kid), None
356-
)
353+
signing_key_entry = next((k for k in jwks.get("keys", []) if k.get("kid") == kid), None)
357354
if signing_key_entry is None:
358355
raise JWTVerificationError(f"Signing key with kid '{kid}' not found in JWKS")
359356

0 commit comments

Comments
 (0)