iaptoolkit 0.3.5__tar.gz → 0.3.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {iaptoolkit-0.3.5 → iaptoolkit-0.3.6}/PKG-INFO +1 -1
- {iaptoolkit-0.3.5 → iaptoolkit-0.3.6}/pyproject.toml +1 -1
- {iaptoolkit-0.3.5 → iaptoolkit-0.3.6}/src/iaptoolkit/utils/verify.py +2 -3
- {iaptoolkit-0.3.5 → iaptoolkit-0.3.6}/LICENSE +0 -0
- {iaptoolkit-0.3.5 → iaptoolkit-0.3.6}/README.md +0 -0
- {iaptoolkit-0.3.5 → iaptoolkit-0.3.6}/src/iaptoolkit/__init__.py +0 -0
- {iaptoolkit-0.3.5 → iaptoolkit-0.3.6}/src/iaptoolkit/constants.py +0 -0
- {iaptoolkit-0.3.5 → iaptoolkit-0.3.6}/src/iaptoolkit/exceptions.py +0 -0
- {iaptoolkit-0.3.5 → iaptoolkit-0.3.6}/src/iaptoolkit/headers.py +0 -0
- {iaptoolkit-0.3.5 → iaptoolkit-0.3.6}/src/iaptoolkit/tokens/__init__.py +0 -0
- {iaptoolkit-0.3.5 → iaptoolkit-0.3.6}/src/iaptoolkit/tokens/service_account.py +0 -0
- {iaptoolkit-0.3.5 → iaptoolkit-0.3.6}/src/iaptoolkit/tokens/structs.py +0 -0
- {iaptoolkit-0.3.5 → iaptoolkit-0.3.6}/src/iaptoolkit/tokens/token_datastore.py +0 -0
- {iaptoolkit-0.3.5 → iaptoolkit-0.3.6}/src/iaptoolkit/utils/__init__.py +0 -0
- {iaptoolkit-0.3.5 → iaptoolkit-0.3.6}/src/iaptoolkit/utils/urls.py +0 -0
|
@@ -64,7 +64,7 @@ class GoogleIAPKeys:
|
|
|
64
64
|
google_public_keys: GoogleIAPKeys | None = None
|
|
65
65
|
|
|
66
66
|
|
|
67
|
-
def verify_iap_jwt(iap_jwt: str, expected_audience: str) -> str:
|
|
67
|
+
def verify_iap_jwt(iap_jwt: str, expected_audience: str|None) -> str:
|
|
68
68
|
global google_public_keys # Use as singleton
|
|
69
69
|
if not google_public_keys:
|
|
70
70
|
google_public_keys = GoogleIAPKeys()
|
|
@@ -75,8 +75,7 @@ def verify_iap_jwt(iap_jwt: str, expected_audience: str) -> str:
|
|
|
75
75
|
email = decoded_jwt.get("email")
|
|
76
76
|
audience = decoded_jwt.get("aud")
|
|
77
77
|
|
|
78
|
-
if audience != expected_audience:
|
|
79
|
-
print("Invalid audience:", audience)
|
|
78
|
+
if expected_audience and audience != expected_audience:
|
|
80
79
|
raise JWTVerificationFailure("Audience mismatch when verifying IAP JWT")
|
|
81
80
|
|
|
82
81
|
return email
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|