Skip to content

Commit 36ddbe4

Browse files
committed
add check_url to silent_auth test and readme
1 parent df35222 commit 36ddbe4

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,7 @@ params = {
449449
]
450450
}
451451
verify_request = verify2.new_request(params)
452+
check_url = verify_request['check_url'] # URL to continue with the silent auth workflow
452453
```
453454

454455
### Send a verification code with custom options, including a custom code
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"request_id": "b3a2f4bd-7bda-4e5e-978a-81514702d2ce",
3+
"check_url": "https://api-eu-3.vonage.com/v2/verify/b3a2f4bd-7bda-4e5e-978a-81514702d2ce/silent-auth/redirect"
4+
}

tests/test_verify2.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,14 +392,18 @@ def test_new_request_silent_auth():
392392
stub(
393393
responses.POST,
394394
'https://api.nexmo.com/v2/verify',
395-
fixture_path='verify2/create_request.json',
395+
fixture_path='verify2/create_request_silent_auth.json',
396396
status_code=202,
397397
)
398398

399399
params = {'brand': 'ACME, Inc', 'workflow': [{'channel': 'silent_auth', 'to': '447700900000'}]}
400400
verify_request = verify2.new_request(params)
401401

402-
assert verify_request['request_id'] == 'c11236f4-00bf-4b89-84ba-88b25df97315'
402+
assert verify_request['request_id'] == 'b3a2f4bd-7bda-4e5e-978a-81514702d2ce'
403+
assert (
404+
verify_request['check_url']
405+
== 'https://api-eu-3.vonage.com/v2/verify/b3a2f4bd-7bda-4e5e-978a-81514702d2ce/silent-auth/redirect'
406+
)
403407

404408

405409
@responses.activate

0 commit comments

Comments
 (0)