google-auth 2.16.2__tar.gz → 2.16.3__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.
Files changed (147) hide show
  1. {google-auth-2.16.2/google_auth.egg-info → google-auth-2.16.3}/PKG-INFO +1 -1
  2. {google-auth-2.16.2 → google-auth-2.16.3}/google/auth/version.py +1 -1
  3. {google-auth-2.16.2 → google-auth-2.16.3}/google/oauth2/challenges.py +41 -19
  4. {google-auth-2.16.2 → google-auth-2.16.3/google_auth.egg-info}/PKG-INFO +1 -1
  5. {google-auth-2.16.2 → google-auth-2.16.3}/tests/oauth2/test_challenges.py +59 -1
  6. {google-auth-2.16.2 → google-auth-2.16.3}/LICENSE +0 -0
  7. {google-auth-2.16.2 → google-auth-2.16.3}/MANIFEST.in +0 -0
  8. {google-auth-2.16.2 → google-auth-2.16.3}/README.rst +0 -0
  9. {google-auth-2.16.2 → google-auth-2.16.3}/google/__init__.py +0 -0
  10. {google-auth-2.16.2 → google-auth-2.16.3}/google/auth/__init__.py +0 -0
  11. {google-auth-2.16.2 → google-auth-2.16.3}/google/auth/_cloud_sdk.py +0 -0
  12. {google-auth-2.16.2 → google-auth-2.16.3}/google/auth/_credentials_async.py +0 -0
  13. {google-auth-2.16.2 → google-auth-2.16.3}/google/auth/_default.py +0 -0
  14. {google-auth-2.16.2 → google-auth-2.16.3}/google/auth/_default_async.py +0 -0
  15. {google-auth-2.16.2 → google-auth-2.16.3}/google/auth/_exponential_backoff.py +0 -0
  16. {google-auth-2.16.2 → google-auth-2.16.3}/google/auth/_helpers.py +0 -0
  17. {google-auth-2.16.2 → google-auth-2.16.3}/google/auth/_jwt_async.py +0 -0
  18. {google-auth-2.16.2 → google-auth-2.16.3}/google/auth/_oauth2client.py +0 -0
  19. {google-auth-2.16.2 → google-auth-2.16.3}/google/auth/_service_account_info.py +0 -0
  20. {google-auth-2.16.2 → google-auth-2.16.3}/google/auth/api_key.py +0 -0
  21. {google-auth-2.16.2 → google-auth-2.16.3}/google/auth/app_engine.py +0 -0
  22. {google-auth-2.16.2 → google-auth-2.16.3}/google/auth/aws.py +0 -0
  23. {google-auth-2.16.2 → google-auth-2.16.3}/google/auth/compute_engine/__init__.py +0 -0
  24. {google-auth-2.16.2 → google-auth-2.16.3}/google/auth/compute_engine/_metadata.py +0 -0
  25. {google-auth-2.16.2 → google-auth-2.16.3}/google/auth/compute_engine/credentials.py +0 -0
  26. {google-auth-2.16.2 → google-auth-2.16.3}/google/auth/credentials.py +0 -0
  27. {google-auth-2.16.2 → google-auth-2.16.3}/google/auth/crypt/__init__.py +0 -0
  28. {google-auth-2.16.2 → google-auth-2.16.3}/google/auth/crypt/_cryptography_rsa.py +0 -0
  29. {google-auth-2.16.2 → google-auth-2.16.3}/google/auth/crypt/_helpers.py +0 -0
  30. {google-auth-2.16.2 → google-auth-2.16.3}/google/auth/crypt/_python_rsa.py +0 -0
  31. {google-auth-2.16.2 → google-auth-2.16.3}/google/auth/crypt/base.py +0 -0
  32. {google-auth-2.16.2 → google-auth-2.16.3}/google/auth/crypt/es256.py +0 -0
  33. {google-auth-2.16.2 → google-auth-2.16.3}/google/auth/crypt/rsa.py +0 -0
  34. {google-auth-2.16.2 → google-auth-2.16.3}/google/auth/downscoped.py +0 -0
  35. {google-auth-2.16.2 → google-auth-2.16.3}/google/auth/environment_vars.py +0 -0
  36. {google-auth-2.16.2 → google-auth-2.16.3}/google/auth/exceptions.py +0 -0
  37. {google-auth-2.16.2 → google-auth-2.16.3}/google/auth/external_account.py +0 -0
  38. {google-auth-2.16.2 → google-auth-2.16.3}/google/auth/external_account_authorized_user.py +0 -0
  39. {google-auth-2.16.2 → google-auth-2.16.3}/google/auth/iam.py +0 -0
  40. {google-auth-2.16.2 → google-auth-2.16.3}/google/auth/identity_pool.py +0 -0
  41. {google-auth-2.16.2 → google-auth-2.16.3}/google/auth/impersonated_credentials.py +0 -0
  42. {google-auth-2.16.2 → google-auth-2.16.3}/google/auth/jwt.py +0 -0
  43. {google-auth-2.16.2 → google-auth-2.16.3}/google/auth/pluggable.py +0 -0
  44. {google-auth-2.16.2 → google-auth-2.16.3}/google/auth/transport/__init__.py +0 -0
  45. {google-auth-2.16.2 → google-auth-2.16.3}/google/auth/transport/_aiohttp_requests.py +0 -0
  46. {google-auth-2.16.2 → google-auth-2.16.3}/google/auth/transport/_custom_tls_signer.py +0 -0
  47. {google-auth-2.16.2 → google-auth-2.16.3}/google/auth/transport/_http_client.py +0 -0
  48. {google-auth-2.16.2 → google-auth-2.16.3}/google/auth/transport/_mtls_helper.py +0 -0
  49. {google-auth-2.16.2 → google-auth-2.16.3}/google/auth/transport/grpc.py +0 -0
  50. {google-auth-2.16.2 → google-auth-2.16.3}/google/auth/transport/mtls.py +0 -0
  51. {google-auth-2.16.2 → google-auth-2.16.3}/google/auth/transport/requests.py +0 -0
  52. {google-auth-2.16.2 → google-auth-2.16.3}/google/auth/transport/urllib3.py +0 -0
  53. {google-auth-2.16.2 → google-auth-2.16.3}/google/oauth2/__init__.py +0 -0
  54. {google-auth-2.16.2 → google-auth-2.16.3}/google/oauth2/_client.py +0 -0
  55. {google-auth-2.16.2 → google-auth-2.16.3}/google/oauth2/_client_async.py +0 -0
  56. {google-auth-2.16.2 → google-auth-2.16.3}/google/oauth2/_credentials_async.py +0 -0
  57. {google-auth-2.16.2 → google-auth-2.16.3}/google/oauth2/_id_token_async.py +0 -0
  58. {google-auth-2.16.2 → google-auth-2.16.3}/google/oauth2/_reauth_async.py +0 -0
  59. {google-auth-2.16.2 → google-auth-2.16.3}/google/oauth2/_service_account_async.py +0 -0
  60. {google-auth-2.16.2 → google-auth-2.16.3}/google/oauth2/credentials.py +0 -0
  61. {google-auth-2.16.2 → google-auth-2.16.3}/google/oauth2/gdch_credentials.py +0 -0
  62. {google-auth-2.16.2 → google-auth-2.16.3}/google/oauth2/id_token.py +0 -0
  63. {google-auth-2.16.2 → google-auth-2.16.3}/google/oauth2/reauth.py +0 -0
  64. {google-auth-2.16.2 → google-auth-2.16.3}/google/oauth2/service_account.py +0 -0
  65. {google-auth-2.16.2 → google-auth-2.16.3}/google/oauth2/sts.py +0 -0
  66. {google-auth-2.16.2 → google-auth-2.16.3}/google/oauth2/utils.py +0 -0
  67. {google-auth-2.16.2 → google-auth-2.16.3}/google_auth.egg-info/SOURCES.txt +0 -0
  68. {google-auth-2.16.2 → google-auth-2.16.3}/google_auth.egg-info/dependency_links.txt +0 -0
  69. {google-auth-2.16.2 → google-auth-2.16.3}/google_auth.egg-info/namespace_packages.txt +0 -0
  70. {google-auth-2.16.2 → google-auth-2.16.3}/google_auth.egg-info/requires.txt +0 -0
  71. {google-auth-2.16.2 → google-auth-2.16.3}/google_auth.egg-info/top_level.txt +0 -0
  72. {google-auth-2.16.2 → google-auth-2.16.3}/setup.cfg +0 -0
  73. {google-auth-2.16.2 → google-auth-2.16.3}/setup.py +0 -0
  74. {google-auth-2.16.2 → google-auth-2.16.3}/tests/__init__.py +0 -0
  75. {google-auth-2.16.2 → google-auth-2.16.3}/tests/compute_engine/__init__.py +0 -0
  76. {google-auth-2.16.2 → google-auth-2.16.3}/tests/compute_engine/test__metadata.py +0 -0
  77. {google-auth-2.16.2 → google-auth-2.16.3}/tests/compute_engine/test_credentials.py +0 -0
  78. {google-auth-2.16.2 → google-auth-2.16.3}/tests/conftest.py +0 -0
  79. {google-auth-2.16.2 → google-auth-2.16.3}/tests/crypt/__init__.py +0 -0
  80. {google-auth-2.16.2 → google-auth-2.16.3}/tests/crypt/test__cryptography_rsa.py +0 -0
  81. {google-auth-2.16.2 → google-auth-2.16.3}/tests/crypt/test__python_rsa.py +0 -0
  82. {google-auth-2.16.2 → google-auth-2.16.3}/tests/crypt/test_crypt.py +0 -0
  83. {google-auth-2.16.2 → google-auth-2.16.3}/tests/crypt/test_es256.py +0 -0
  84. {google-auth-2.16.2 → google-auth-2.16.3}/tests/data/authorized_user.json +0 -0
  85. {google-auth-2.16.2 → google-auth-2.16.3}/tests/data/authorized_user_cloud_sdk.json +0 -0
  86. {google-auth-2.16.2 → google-auth-2.16.3}/tests/data/authorized_user_cloud_sdk_with_quota_project_id.json +0 -0
  87. {google-auth-2.16.2 → google-auth-2.16.3}/tests/data/authorized_user_with_rapt_token.json +0 -0
  88. {google-auth-2.16.2 → google-auth-2.16.3}/tests/data/client_secrets.json +0 -0
  89. {google-auth-2.16.2 → google-auth-2.16.3}/tests/data/context_aware_metadata.json +0 -0
  90. {google-auth-2.16.2 → google-auth-2.16.3}/tests/data/enterprise_cert_invalid.json +0 -0
  91. {google-auth-2.16.2 → google-auth-2.16.3}/tests/data/enterprise_cert_valid.json +0 -0
  92. {google-auth-2.16.2 → google-auth-2.16.3}/tests/data/es256_privatekey.pem +0 -0
  93. {google-auth-2.16.2 → google-auth-2.16.3}/tests/data/es256_public_cert.pem +0 -0
  94. {google-auth-2.16.2 → google-auth-2.16.3}/tests/data/es256_publickey.pem +0 -0
  95. {google-auth-2.16.2 → google-auth-2.16.3}/tests/data/es256_service_account.json +0 -0
  96. {google-auth-2.16.2 → google-auth-2.16.3}/tests/data/external_account_authorized_user.json +0 -0
  97. {google-auth-2.16.2 → google-auth-2.16.3}/tests/data/external_subject_token.json +0 -0
  98. {google-auth-2.16.2 → google-auth-2.16.3}/tests/data/external_subject_token.txt +0 -0
  99. {google-auth-2.16.2 → google-auth-2.16.3}/tests/data/gdch_service_account.json +0 -0
  100. {google-auth-2.16.2 → google-auth-2.16.3}/tests/data/impersonated_service_account_authorized_user_source.json +0 -0
  101. {google-auth-2.16.2 → google-auth-2.16.3}/tests/data/impersonated_service_account_service_account_source.json +0 -0
  102. {google-auth-2.16.2 → google-auth-2.16.3}/tests/data/impersonated_service_account_with_quota_project.json +0 -0
  103. {google-auth-2.16.2 → google-auth-2.16.3}/tests/data/old_oauth_credentials_py3.pickle +0 -0
  104. {google-auth-2.16.2 → google-auth-2.16.3}/tests/data/other_cert.pem +0 -0
  105. {google-auth-2.16.2 → google-auth-2.16.3}/tests/data/pem_from_pkcs12.pem +0 -0
  106. {google-auth-2.16.2 → google-auth-2.16.3}/tests/data/privatekey.p12 +0 -0
  107. {google-auth-2.16.2 → google-auth-2.16.3}/tests/data/privatekey.pem +0 -0
  108. {google-auth-2.16.2 → google-auth-2.16.3}/tests/data/privatekey.pub +0 -0
  109. {google-auth-2.16.2 → google-auth-2.16.3}/tests/data/public_cert.pem +0 -0
  110. {google-auth-2.16.2 → google-auth-2.16.3}/tests/data/service_account.json +0 -0
  111. {google-auth-2.16.2 → google-auth-2.16.3}/tests/oauth2/__init__.py +0 -0
  112. {google-auth-2.16.2 → google-auth-2.16.3}/tests/oauth2/test__client.py +0 -0
  113. {google-auth-2.16.2 → google-auth-2.16.3}/tests/oauth2/test_credentials.py +0 -0
  114. {google-auth-2.16.2 → google-auth-2.16.3}/tests/oauth2/test_gdch_credentials.py +0 -0
  115. {google-auth-2.16.2 → google-auth-2.16.3}/tests/oauth2/test_id_token.py +0 -0
  116. {google-auth-2.16.2 → google-auth-2.16.3}/tests/oauth2/test_reauth.py +0 -0
  117. {google-auth-2.16.2 → google-auth-2.16.3}/tests/oauth2/test_service_account.py +0 -0
  118. {google-auth-2.16.2 → google-auth-2.16.3}/tests/oauth2/test_sts.py +0 -0
  119. {google-auth-2.16.2 → google-auth-2.16.3}/tests/oauth2/test_utils.py +0 -0
  120. {google-auth-2.16.2 → google-auth-2.16.3}/tests/test__cloud_sdk.py +0 -0
  121. {google-auth-2.16.2 → google-auth-2.16.3}/tests/test__default.py +0 -0
  122. {google-auth-2.16.2 → google-auth-2.16.3}/tests/test__exponential_backoff.py +0 -0
  123. {google-auth-2.16.2 → google-auth-2.16.3}/tests/test__helpers.py +0 -0
  124. {google-auth-2.16.2 → google-auth-2.16.3}/tests/test__oauth2client.py +0 -0
  125. {google-auth-2.16.2 → google-auth-2.16.3}/tests/test__service_account_info.py +0 -0
  126. {google-auth-2.16.2 → google-auth-2.16.3}/tests/test_api_key.py +0 -0
  127. {google-auth-2.16.2 → google-auth-2.16.3}/tests/test_app_engine.py +0 -0
  128. {google-auth-2.16.2 → google-auth-2.16.3}/tests/test_aws.py +0 -0
  129. {google-auth-2.16.2 → google-auth-2.16.3}/tests/test_credentials.py +0 -0
  130. {google-auth-2.16.2 → google-auth-2.16.3}/tests/test_downscoped.py +0 -0
  131. {google-auth-2.16.2 → google-auth-2.16.3}/tests/test_exceptions.py +0 -0
  132. {google-auth-2.16.2 → google-auth-2.16.3}/tests/test_external_account.py +0 -0
  133. {google-auth-2.16.2 → google-auth-2.16.3}/tests/test_external_account_authorized_user.py +0 -0
  134. {google-auth-2.16.2 → google-auth-2.16.3}/tests/test_iam.py +0 -0
  135. {google-auth-2.16.2 → google-auth-2.16.3}/tests/test_identity_pool.py +0 -0
  136. {google-auth-2.16.2 → google-auth-2.16.3}/tests/test_impersonated_credentials.py +0 -0
  137. {google-auth-2.16.2 → google-auth-2.16.3}/tests/test_jwt.py +0 -0
  138. {google-auth-2.16.2 → google-auth-2.16.3}/tests/test_pluggable.py +0 -0
  139. {google-auth-2.16.2 → google-auth-2.16.3}/tests/transport/__init__.py +0 -0
  140. {google-auth-2.16.2 → google-auth-2.16.3}/tests/transport/compliance.py +0 -0
  141. {google-auth-2.16.2 → google-auth-2.16.3}/tests/transport/test__custom_tls_signer.py +0 -0
  142. {google-auth-2.16.2 → google-auth-2.16.3}/tests/transport/test__http_client.py +0 -0
  143. {google-auth-2.16.2 → google-auth-2.16.3}/tests/transport/test__mtls_helper.py +0 -0
  144. {google-auth-2.16.2 → google-auth-2.16.3}/tests/transport/test_grpc.py +0 -0
  145. {google-auth-2.16.2 → google-auth-2.16.3}/tests/transport/test_mtls.py +0 -0
  146. {google-auth-2.16.2 → google-auth-2.16.3}/tests/transport/test_requests.py +0 -0
  147. {google-auth-2.16.2 → google-auth-2.16.3}/tests/transport/test_urllib3.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: google-auth
3
- Version: 2.16.2
3
+ Version: 2.16.3
4
4
  Summary: Google Authentication Library
5
5
  Home-page: https://github.com/googleapis/google-auth-library-python
6
6
  Author: Google Cloud Platform
@@ -12,4 +12,4 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- __version__ = "2.16.2"
15
+ __version__ = "2.16.3"
@@ -124,7 +124,16 @@ class SecurityKeyChallenge(ReauthChallenge):
124
124
  )
125
125
  sk = metadata["securityKey"]
126
126
  challenges = sk["challenges"]
127
- app_id = sk["applicationId"]
127
+ # Read both 'applicationId' and 'relyingPartyId', if they are the same, use
128
+ # applicationId, if they are different, use relyingPartyId first and retry
129
+ # with applicationId
130
+ application_id = sk["applicationId"]
131
+ relying_party_id = sk["relyingPartyId"]
132
+
133
+ if application_id != relying_party_id:
134
+ application_parameters = [relying_party_id, application_id]
135
+ else:
136
+ application_parameters = [application_id]
128
137
 
129
138
  challenge_data = []
130
139
  for c in challenges:
@@ -134,24 +143,37 @@ class SecurityKeyChallenge(ReauthChallenge):
134
143
  challenge = base64.urlsafe_b64decode(challenge)
135
144
  challenge_data.append({"key": key, "challenge": challenge})
136
145
 
137
- try:
138
- api = pyu2f.convenience.authenticator.CreateCompositeAuthenticator(
139
- REAUTH_ORIGIN
140
- )
141
- response = api.Authenticate(
142
- app_id, challenge_data, print_callback=sys.stderr.write
143
- )
144
- return {"securityKey": response}
145
- except pyu2f.errors.U2FError as e:
146
- if e.code == pyu2f.errors.U2FError.DEVICE_INELIGIBLE:
147
- sys.stderr.write("Ineligible security key.\n")
148
- elif e.code == pyu2f.errors.U2FError.TIMEOUT:
149
- sys.stderr.write("Timed out while waiting for security key touch.\n")
150
- else:
151
- raise e
152
- except pyu2f.errors.NoDeviceFoundError:
153
- sys.stderr.write("No security key found.\n")
154
- return None
146
+ # Track number of tries to suppress error message until all application_parameters
147
+ # are tried.
148
+ tries = 0
149
+ for app_id in application_parameters:
150
+ try:
151
+ tries += 1
152
+ api = pyu2f.convenience.authenticator.CreateCompositeAuthenticator(
153
+ REAUTH_ORIGIN
154
+ )
155
+ response = api.Authenticate(
156
+ app_id, challenge_data, print_callback=sys.stderr.write
157
+ )
158
+ return {"securityKey": response}
159
+ except pyu2f.errors.U2FError as e:
160
+ if e.code == pyu2f.errors.U2FError.DEVICE_INELIGIBLE:
161
+ # Only show error if all app_ids have been tried
162
+ if tries == len(application_parameters):
163
+ sys.stderr.write("Ineligible security key.\n")
164
+ return None
165
+ continue
166
+ if e.code == pyu2f.errors.U2FError.TIMEOUT:
167
+ sys.stderr.write(
168
+ "Timed out while waiting for security key touch.\n"
169
+ )
170
+ else:
171
+ raise e
172
+ except pyu2f.errors.PluginError:
173
+ continue
174
+ except pyu2f.errors.NoDeviceFoundError:
175
+ sys.stderr.write("No security key found.\n")
176
+ return None
155
177
 
156
178
 
157
179
  class SamlChallenge(ReauthChallenge):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: google-auth
3
- Version: 2.16.2
3
+ Version: 2.16.3
4
4
  Summary: Google Authentication Library
5
5
  Home-page: https://github.com/googleapis/google-auth-library-python
6
6
  Author: Google Cloud Platform
@@ -45,13 +45,15 @@ def test_security_key():
45
45
  ).decode("ascii"),
46
46
  }
47
47
  ],
48
+ "relyingPartyId": "security_key_application_id",
48
49
  },
49
50
  }
50
51
  mock_key = mock.Mock()
51
52
 
52
53
  challenge = challenges.SecurityKeyChallenge()
53
54
 
54
- # Test the case that security key challenge is passed.
55
+ # Test the case that security key challenge is passed with applicationId and
56
+ # relyingPartyId the same.
55
57
  with mock.patch("pyu2f.model.RegisteredKey", return_value=mock_key):
56
58
  with mock.patch(
57
59
  "pyu2f.convenience.authenticator.CompositeAuthenticator.Authenticate"
@@ -68,6 +70,56 @@ def test_security_key():
68
70
  print_callback=sys.stderr.write,
69
71
  )
70
72
 
73
+ # Test the case that security key challenge is passed with applicationId and
74
+ # relyingPartyId different, first call works.
75
+ metadata["securityKey"]["relyingPartyId"] = "security_key_relying_party_id"
76
+ sys.stderr.write("metadata=" + str(metadata) + "\n")
77
+ with mock.patch("pyu2f.model.RegisteredKey", return_value=mock_key):
78
+ with mock.patch(
79
+ "pyu2f.convenience.authenticator.CompositeAuthenticator.Authenticate"
80
+ ) as mock_authenticate:
81
+ mock_authenticate.return_value = "security key response"
82
+ assert challenge.name == "SECURITY_KEY"
83
+ assert challenge.is_locally_eligible
84
+ assert challenge.obtain_challenge_input(metadata) == {
85
+ "securityKey": "security key response"
86
+ }
87
+ mock_authenticate.assert_called_with(
88
+ "security_key_relying_party_id",
89
+ [{"key": mock_key, "challenge": b"some_challenge"}],
90
+ print_callback=sys.stderr.write,
91
+ )
92
+
93
+ # Test the case that security key challenge is passed with applicationId and
94
+ # relyingPartyId different, first call fails, requires retry.
95
+ metadata["securityKey"]["relyingPartyId"] = "security_key_relying_party_id"
96
+ with mock.patch("pyu2f.model.RegisteredKey", return_value=mock_key):
97
+ with mock.patch(
98
+ "pyu2f.convenience.authenticator.CompositeAuthenticator.Authenticate"
99
+ ) as mock_authenticate:
100
+ assert challenge.name == "SECURITY_KEY"
101
+ assert challenge.is_locally_eligible
102
+ mock_authenticate.side_effect = [
103
+ pyu2f.errors.U2FError(pyu2f.errors.U2FError.DEVICE_INELIGIBLE),
104
+ "security key response",
105
+ ]
106
+ assert challenge.obtain_challenge_input(metadata) == {
107
+ "securityKey": "security key response"
108
+ }
109
+ calls = [
110
+ mock.call(
111
+ "security_key_relying_party_id",
112
+ [{"key": mock_key, "challenge": b"some_challenge"}],
113
+ print_callback=sys.stderr.write,
114
+ ),
115
+ mock.call(
116
+ "security_key_application_id",
117
+ [{"key": mock_key, "challenge": b"some_challenge"}],
118
+ print_callback=sys.stderr.write,
119
+ ),
120
+ ]
121
+ mock_authenticate.assert_has_calls(calls)
122
+
71
123
  # Test various types of exceptions.
72
124
  with mock.patch("pyu2f.model.RegisteredKey", return_value=mock_key):
73
125
  with mock.patch(
@@ -86,6 +138,12 @@ def test_security_key():
86
138
  )
87
139
  assert challenge.obtain_challenge_input(metadata) is None
88
140
 
141
+ with mock.patch(
142
+ "pyu2f.convenience.authenticator.CompositeAuthenticator.Authenticate"
143
+ ) as mock_authenticate:
144
+ mock_authenticate.side_effect = pyu2f.errors.PluginError()
145
+ assert challenge.obtain_challenge_input(metadata) is None
146
+
89
147
  with mock.patch(
90
148
  "pyu2f.convenience.authenticator.CompositeAuthenticator.Authenticate"
91
149
  ) as mock_authenticate:
File without changes
File without changes
File without changes
File without changes
File without changes