Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 188
Adding Support For CIBA with RAR#679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
0329ae462a8b01ba209b303d2d460fe4ca7d5c0098c5af261722e74f0a4b12e4c0a6cd205232eFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| import unittest | ||
| from unittest import mock | ||
| import json | ||
| import requests | ||
| from ...exceptions import Auth0Error, RateLimitError | ||
| @@ -74,5 +75,64 @@ def test_should_require_scope(self, mock_post): | ||
| # Assert the error message is correct | ||
| self.assertIn("missing 1 required positional argument: \'scope\'", str(context.exception)) | ||
| @mock.patch("auth0.rest.RestClient.post") | ||
| def test_with_authorization_details(self, mock_post): | ||
| g = BackChannelLogin("my.domain.com", "cid", client_secret="clsec") | ||
| g.back_channel_login( | ||
| binding_message="This is a binding message.", | ||
| login_hint={"format": "iss_sub", "iss": "https://my.domain.auth0.com/", "sub": "auth0|USER_ID"}, | ||
kishore7snehil marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| scope="openid", | ||
| authorization_details=[ | ||
| { | ||
| "type":"payment_initiation","locations":["https://example.com/payments"], | ||
| "instructedAmount": | ||
| { | ||
| "currency":"EUR","amount":"123.50" | ||
| }, | ||
| "creditorName":"Merchant A", | ||
| "creditorAccount": | ||
| { | ||
| "bic":"ABCIDEFFXXX", | ||
| "iban":"DE021001001093071118603" | ||
| }, | ||
| "remittanceInformationUnstructured":"Ref Number Merchant" | ||
| } | ||
| ], | ||
kishore7snehil marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| ) | ||
| args, kwargs = mock_post.call_args | ||
| expected_data = { | ||
| "client_id": "cid", | ||
| "client_secret": "clsec", | ||
| "binding_message": "This is a binding message.", | ||
| "login_hint": {"format": "iss_sub", "iss": "https://my.domain.auth0.com/", "sub": "auth0|USER_ID" }, | ||
| "scope": "openid", | ||
| "authorization_details": [ | ||
| { | ||
| "type":"payment_initiation","locations":["https://example.com/payments"], | ||
| "instructedAmount": | ||
| { | ||
| "currency":"EUR","amount":"123.50" | ||
| }, | ||
| "creditorName":"Merchant A", | ||
| "creditorAccount": | ||
| { | ||
| "bic":"ABCIDEFFXXX", | ||
| "iban":"DE021001001093071118603" | ||
| }, | ||
| "remittanceInformationUnstructured":"Ref Number Merchant" | ||
| }], | ||
| } | ||
| actual_data = kwargs["data"] | ||
| self.assertEqual(args[0], "https://my.domain.com/bc-authorize") | ||
| self.assertEqual( | ||
| json.dumps(actual_data, sort_keys=True), | ||
| json.dumps(expected_data, sort_keys=True) | ||
| ) | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.