Skip to content

Commit b724099

Browse files
committed
chore: resolve comments
1 parent 966b313 commit b724099

File tree

2 files changed

+0
-7
lines changed

2 files changed

+0
-7
lines changed

firebase_admin/fpnv.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ def _validate_headers(self, headers: Any) -> None:
178178
def _validate_payload(self, token: str, signing_key: str) -> Dict[str, Any]:
179179
"""Decodes and verifies the token."""
180180
expected_issuer = f'{_FPNV_ISSUER}{self._project_id}'
181-
payload = {}
182181
try:
183182
payload = jwt.decode(
184183
token,
@@ -210,8 +209,6 @@ def _validate_payload(self, token: str, signing_key: str) -> Dict[str, Any]:
210209
f'Decoding FPNV token failed. Error: {exception}'
211210
) from exception
212211

213-
if not payload.get('iss').startswith(_FPNV_ISSUER):
214-
raise ValueError('Token does not contain the correct "iss" (issuer).')
215212
_Validators.check_string(
216213
'The provided FPNV token "sub" (subject) claim',
217214
payload.get('sub'))

tests/test_fpnv.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,9 @@
2525

2626
# Mock Data
2727
_PROJECT_ID = 'mock-project-id'
28-
_FPNV_TOKEN = 'fpnv_token_string'
2928
_EXP_TIMESTAMP = 2000000000
3029
_ISSUER = f'https://fpnv.googleapis.com/projects/{_PROJECT_ID}'
31-
_JWKS_URL = 'https://fpnv.googleapis.com/v1beta/jwks'
3230
_PHONE_NUMBER = '+1234567890'
33-
_ISSUER_PREFIX = 'https://fpnv.googleapis.com/projects/'
34-
_PRIVATE_KEY = 'test-private-key' # In real tests, use a real RSA/EC private key
3531
_PUBLIC_KEY = 'test-public-key' # In real tests, use the corresponding public key
3632

3733
_MOCK_PAYLOAD = {

0 commit comments

Comments
 (0)