File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change 18
18
import datetime
19
19
import json
20
20
import os
21
- import sys
22
21
import time
23
22
24
23
from google .auth import crypt
@@ -77,21 +76,13 @@ def _merge_jwt_claims(defaults, overrides):
77
76
return defaults
78
77
79
78
80
- def _is_py_35 ():
81
- return sys .version_info .minor == 5
82
-
83
-
84
79
def verify_custom_token (custom_token , expected_claims , tenant_id = None ):
85
80
assert isinstance (custom_token , bytes )
86
81
expected_email = MOCK_SERVICE_ACCOUNT_EMAIL
87
82
header = jwt .decode_header (custom_token )
88
83
assert header .get ('typ' ) == 'JWT'
89
84
if _is_emulated ():
90
- # Setting alg requires https://github.com/googleapis/google-auth-library-python/pull/729
91
- # which is only available in latest google-auth versions that's supported on Python 3.6
92
- # and up. Skip the test on Python 3.5 for now.
93
- if not _is_py_35 ():
94
- assert header .get ('alg' ) == 'none'
85
+ assert header .get ('alg' ) == 'none'
95
86
assert custom_token .split (b'.' )[2 ] == b''
96
87
expected_email = _token_gen .AUTH_EMULATOR_EMAIL
97
88
token = jwt .decode (custom_token , verify = False )
You can’t perform that action at this time.
0 commit comments