@@ -1203,7 +1203,9 @@ async def test_oidc_verification(
1203
1203
app ["id" ], app ["secret" ], str (uuid .uuid4 ())
1204
1204
)
1205
1205
1206
+ nonce = await martine_phone .create_oidc_nonce ()
1206
1207
await martine_phone .start (identity )
1208
+ await martine_phone ._set_oidc_test_nonce (nonce )
1207
1209
await martine_phone .register_identity (OidcIdTokenVerification (oidc_id_token ))
1208
1210
await martine_phone .stop ()
1209
1211
@@ -1213,6 +1215,8 @@ async def test_oidc_verification(
1213
1215
await martine_laptop .start (identity )
1214
1216
1215
1217
assert martine_laptop .status == TankerStatus .IDENTITY_VERIFICATION_NEEDED
1218
+ nonce = await martine_laptop .create_oidc_nonce ()
1219
+ await martine_laptop ._set_oidc_test_nonce (nonce )
1216
1220
await martine_laptop .verify_identity (OidcIdTokenVerification (oidc_id_token ))
1217
1221
assert martine_laptop .status == TankerStatus .READY
1218
1222
@@ -1223,44 +1227,6 @@ async def test_oidc_verification(
1223
1227
await martine_laptop .stop ()
1224
1228
1225
1229
1226
- @pytest .mark .asyncio
1227
- async def test_oidc_preshare (tmp_path : Path , app : Dict [str , str ], admin : Admin ) -> None :
1228
- email , oidc_id_token = set_up_oidc (app , admin , "martine" )
1229
- alice = await create_user_session (tmp_path , app )
1230
-
1231
- provisional_identity = tankersdk_identity .create_provisional_identity (
1232
- app ["id" ], email
1233
- )
1234
- public_provisional_identity = tankersdk_identity .get_public_identity (
1235
- provisional_identity
1236
- )
1237
-
1238
- message = b"hello OIDC user"
1239
- encrypted = await alice .session .encrypt (
1240
- message , EncryptionOptions (share_with_users = [public_provisional_identity ])
1241
- )
1242
-
1243
- martine_phone = create_tanker (app ["id" ], persistent_path = tmp_path )
1244
- identity = tankersdk_identity .create_identity (
1245
- app ["id" ], app ["secret" ], str (uuid .uuid4 ())
1246
- )
1247
-
1248
- status = await martine_phone .start (identity )
1249
- assert status == TankerStatus .IDENTITY_REGISTRATION_NEEDED
1250
- await martine_phone .register_identity (OidcIdTokenVerification (oidc_id_token ))
1251
- attach_result = await martine_phone .attach_provisional_identity (
1252
- provisional_identity
1253
- )
1254
- assert attach_result .status == TankerStatus .IDENTITY_VERIFICATION_NEEDED
1255
- await martine_phone .verify_provisional_identity (
1256
- OidcIdTokenVerification (oidc_id_token )
1257
- )
1258
- clear_data = await alice .session .decrypt (encrypted )
1259
- assert clear_data == message
1260
- await martine_phone .stop ()
1261
- await alice .session .stop ()
1262
-
1263
-
1264
1230
@pytest .mark .asyncio
1265
1231
async def test_register_fails_with_preverified_email (
1266
1232
tmp_path : Path , app : Dict [str , str ], admin : Admin
0 commit comments