Skip to content

Commit 8c3cf46

Browse files
committed
Test the failure and success custom display
1 parent e8f1890 commit 8c3cf46

File tree

7 files changed

+399
-1
lines changed

7 files changed

+399
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<a href="https://github.com/Colin-b/requests_auth/actions"><img alt="Build status" src="https://github.com/Colin-b/requests_auth/workflows/Release/badge.svg"></a>
66
<a href="https://github.com/Colin-b/requests_auth/actions"><img alt="Coverage" src="https://img.shields.io/badge/coverage-100%25-brightgreen"></a>
77
<a href="https://github.com/psf/black"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>
8-
<a href="https://github.com/Colin-b/requests_auth/actions"><img alt="Number of tests" src="https://img.shields.io/badge/tests-351 passed-blue"></a>
8+
<a href="https://github.com/Colin-b/requests_auth/actions"><img alt="Number of tests" src="https://img.shields.io/badge/tests-363 passed-blue"></a>
99
<a href="https://pypi.org/project/requests-auth/"><img alt="Number of downloads" src="https://img.shields.io/pypi/dm/requests_auth"></a>
1010
</p>
1111

tests/oauth2/authorization_code/test_oauth2_authorization_code.py

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,73 @@ def test_oauth2_authorization_code_flow_uses_redirect_uri_domain(
9292
tab.assert_success()
9393

9494

95+
def test_oauth2_authorization_code_flow_uses_custom_success(
96+
token_cache, responses: RequestsMock, browser_mock: BrowserMock
97+
):
98+
auth = requests_auth.OAuth2AuthorizationCode(
99+
"http://provide_code",
100+
"http://provide_access_token",
101+
)
102+
requests_auth.OAuth2.display.success_html = (
103+
"<body><div>SUCCESS: {display_time}</div></body>"
104+
)
105+
tab = browser_mock.add_response(
106+
opened_url="http://provide_code?response_type=code&state=163f0455b3e9cad3ca04254e5a0169553100d3aa0756c7964d897da316a695ffed5b4f46ef305094fd0a88cfe4b55ff257652015e4aa8f87b97513dba440f8de&redirect_uri=http%3A%2F%2Flocalhost%3A5000%2F",
107+
reply_url="http://localhost:5000#code=SplxlOBeZQQYbYS6WxSbIA&state=163f0455b3e9cad3ca04254e5a0169553100d3aa0756c7964d897da316a695ffed5b4f46ef305094fd0a88cfe4b55ff257652015e4aa8f87b97513dba440f8de",
108+
displayed_html="<body><div>SUCCESS: {display_time}</div></body>",
109+
)
110+
responses.post(
111+
"http://provide_access_token",
112+
json={
113+
"access_token": "2YotnFZFEjr1zCsicMWpAA",
114+
"token_type": "example",
115+
"expires_in": 3600,
116+
"refresh_token": "tGzv3JOkF0XG5Qx2TlKWIA",
117+
"example_parameter": "example_value",
118+
},
119+
match=[
120+
urlencoded_params_matcher(
121+
{
122+
"grant_type": "authorization_code",
123+
"redirect_uri": "http://localhost:5000/",
124+
"response_type": "code",
125+
"code": "SplxlOBeZQQYbYS6WxSbIA",
126+
}
127+
),
128+
],
129+
)
130+
responses.get(
131+
"http://authorized_only",
132+
match=[header_matcher({"Authorization": "Bearer 2YotnFZFEjr1zCsicMWpAA"})],
133+
)
134+
135+
requests.get("http://authorized_only", auth=auth)
136+
137+
tab.assert_success()
138+
139+
140+
def test_oauth2_authorization_code_flow_uses_custom_failure(
141+
token_cache, browser_mock: BrowserMock
142+
):
143+
auth = requests_auth.OAuth2AuthorizationCode(
144+
"http://provide_code",
145+
"http://provide_access_token",
146+
)
147+
requests_auth.OAuth2.display.failure_html = "FAILURE: {display_time}\n{information}"
148+
tab = browser_mock.add_response(
149+
opened_url="http://provide_code?response_type=code&state=163f0455b3e9cad3ca04254e5a0169553100d3aa0756c7964d897da316a695ffed5b4f46ef305094fd0a88cfe4b55ff257652015e4aa8f87b97513dba440f8de&redirect_uri=http%3A%2F%2Flocalhost%3A5000%2F",
150+
reply_url="http://localhost:5000#error=invalid_request",
151+
displayed_html="FAILURE: {display_time}\n{information}",
152+
)
153+
154+
with pytest.raises(requests_auth.InvalidGrantRequest):
155+
requests.get("http://authorized_only", auth=auth)
156+
157+
tab.assert_failure(
158+
"invalid_request: The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed."
159+
)
160+
161+
95162
def test_oauth2_authorization_code_flow_get_code_is_sent_in_authorization_header_by_default(
96163
token_cache, responses: RequestsMock, browser_mock: BrowserMock
97164
):

tests/oauth2/authorization_code/test_oauth2_authorization_code_okta.py

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,75 @@ def test_oauth2_authorization_code_flow_uses_redirect_uri_domain(
9898
tab.assert_success()
9999

100100

101+
def test_oauth2_authorization_code_flow_uses_custom_success(
102+
token_cache, responses: RequestsMock, browser_mock: BrowserMock
103+
):
104+
auth = requests_auth.OktaAuthorizationCode(
105+
"testserver.okta-emea.com",
106+
"54239d18-c68c-4c47-8bdd-ce71ea1d50cd",
107+
)
108+
requests_auth.OAuth2.display.success_html = (
109+
"<body><div>SUCCESS: {display_time}</div></body>"
110+
)
111+
tab = browser_mock.add_response(
112+
opened_url="https://testserver.okta-emea.com/oauth2/default/v1/authorize?client_id=54239d18-c68c-4c47-8bdd-ce71ea1d50cd&scope=openid&response_type=code&state=5264d11c8b268ccf911ce564ca42fd75cea68c4a3c1ec3ac1ab20243891ab7cd5250ad4c2d002017c6e8ac2ba34954293baa5e0e4fd00bb9ffd4a39c45f1960b&redirect_uri=http%3A%2F%2Flocalhost%3A5000%2F",
113+
reply_url="http://localhost:5000#code=SplxlOBeZQQYbYS6WxSbIA&state=5264d11c8b268ccf911ce564ca42fd75cea68c4a3c1ec3ac1ab20243891ab7cd5250ad4c2d002017c6e8ac2ba34954293baa5e0e4fd00bb9ffd4a39c45f1960b",
114+
displayed_html="<body><div>SUCCESS: {display_time}</div></body>",
115+
)
116+
responses.post(
117+
"https://testserver.okta-emea.com/oauth2/default/v1/token",
118+
json={
119+
"access_token": "2YotnFZFEjr1zCsicMWpAA",
120+
"token_type": "example",
121+
"expires_in": 3600,
122+
"refresh_token": "tGzv3JOkF0XG5Qx2TlKWIA",
123+
"example_parameter": "example_value",
124+
},
125+
match=[
126+
urlencoded_params_matcher(
127+
{
128+
"grant_type": "authorization_code",
129+
"redirect_uri": "http://localhost:5000/",
130+
"client_id": "54239d18-c68c-4c47-8bdd-ce71ea1d50cd",
131+
"scope": "openid",
132+
"response_type": "code",
133+
"code": "SplxlOBeZQQYbYS6WxSbIA",
134+
}
135+
),
136+
],
137+
)
138+
responses.get(
139+
"http://authorized_only",
140+
match=[header_matcher({"Authorization": "Bearer 2YotnFZFEjr1zCsicMWpAA"})],
141+
)
142+
143+
requests.get("http://authorized_only", auth=auth)
144+
145+
tab.assert_success()
146+
147+
148+
def test_oauth2_authorization_code_flow_uses_custom_failure(
149+
token_cache, browser_mock: BrowserMock
150+
):
151+
auth = requests_auth.OktaAuthorizationCode(
152+
"testserver.okta-emea.com",
153+
"54239d18-c68c-4c47-8bdd-ce71ea1d50cd",
154+
)
155+
requests_auth.OAuth2.display.failure_html = "FAILURE: {display_time}\n{information}"
156+
tab = browser_mock.add_response(
157+
opened_url="https://testserver.okta-emea.com/oauth2/default/v1/authorize?client_id=54239d18-c68c-4c47-8bdd-ce71ea1d50cd&scope=openid&response_type=code&state=5264d11c8b268ccf911ce564ca42fd75cea68c4a3c1ec3ac1ab20243891ab7cd5250ad4c2d002017c6e8ac2ba34954293baa5e0e4fd00bb9ffd4a39c45f1960b&redirect_uri=http%3A%2F%2Flocalhost%3A5000%2F",
158+
reply_url="http://localhost:5000#error=invalid_request",
159+
displayed_html="FAILURE: {display_time}\n{information}",
160+
)
161+
162+
with pytest.raises(requests_auth.InvalidGrantRequest):
163+
requests.get("http://authorized_only", auth=auth)
164+
165+
tab.assert_failure(
166+
"invalid_request: The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed."
167+
)
168+
169+
101170
def test_okta_authorization_code_flow_get_code_is_sent_in_authorization_header_by_default(
102171
token_cache, responses: RequestsMock, browser_mock: BrowserMock
103172
):

tests/oauth2/authorization_code/test_oauth2_authorization_code_wakatime.py

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,73 @@ def test_oauth2_authorization_code_flow_uses_redirect_uri_domain(
9393
tab.assert_success()
9494

9595

96+
def test_oauth2_authorization_code_flow_uses_custom_success(
97+
token_cache, responses: RequestsMock, browser_mock: BrowserMock
98+
):
99+
auth = requests_auth.WakaTimeAuthorizationCode(
100+
"jPJQV0op6Pu3b66MWDi8b1wD",
101+
"waka_sec_0c4MBGeR9LN74LzV5uelF9SgeQ32CqfeWpIuieneBbsL57dAAlqqJWDiVDJOlsSx61pVwHMKlsb3uMvU",
102+
scope="email",
103+
)
104+
requests_auth.OAuth2.display.success_html = (
105+
"<body><div>SUCCESS: {display_time}</div></body>"
106+
)
107+
tab = browser_mock.add_response(
108+
opened_url="https://wakatime.com/oauth/authorize?client_id=jPJQV0op6Pu3b66MWDi8b1wD&client_secret=waka_sec_0c4MBGeR9LN74LzV5uelF9SgeQ32CqfeWpIuieneBbsL57dAAlqqJWDiVDJOlsSx61pVwHMKlsb3uMvU&scope=email&response_type=code&state=5d0adb208bdbecaf5cfb6de0bf4ba0aea52986f3fc5ea7bc30c4b2db449c17e5c9d15f9a3926476cdaf1c72e9f73c7cfdc624dde0187c38d8c6b04532770df2a&redirect_uri=http%3A%2F%2Flocalhost%3A5000%2F",
109+
reply_url="http://localhost:5000#code=SplxlOBeZQQYbYS6WxSbIA&state=5d0adb208bdbecaf5cfb6de0bf4ba0aea52986f3fc5ea7bc30c4b2db449c17e5c9d15f9a3926476cdaf1c72e9f73c7cfdc624dde0187c38d8c6b04532770df2a",
110+
displayed_html="<body><div>SUCCESS: {display_time}</div></body>",
111+
)
112+
responses.post(
113+
"https://wakatime.com/oauth/token",
114+
body="access_token=waka_tok_12345&token_type=bearer&expires_in=3600&refresh_token=waka_ref_12345&scope=email&example_parameter=example_value",
115+
content_type="text/html; charset=utf-8",
116+
match=[
117+
urlencoded_params_matcher(
118+
{
119+
"grant_type": "authorization_code",
120+
"redirect_uri": "http://localhost:5000/",
121+
"client_id": "jPJQV0op6Pu3b66MWDi8b1wD",
122+
"client_secret": "waka_sec_0c4MBGeR9LN74LzV5uelF9SgeQ32CqfeWpIuieneBbsL57dAAlqqJWDiVDJOlsSx61pVwHMKlsb3uMvU",
123+
"scope": "email",
124+
"response_type": "code",
125+
"code": "SplxlOBeZQQYbYS6WxSbIA",
126+
}
127+
)
128+
],
129+
)
130+
responses.get(
131+
"https://authorized_only",
132+
match=[header_matcher({"Authorization": "Bearer waka_tok_12345"})],
133+
)
134+
135+
requests.get("https://authorized_only", auth=auth)
136+
137+
tab.assert_success()
138+
139+
140+
def test_oauth2_authorization_code_flow_uses_custom_failure(
141+
token_cache, browser_mock: BrowserMock
142+
):
143+
auth = requests_auth.WakaTimeAuthorizationCode(
144+
"jPJQV0op6Pu3b66MWDi8b1wD",
145+
"waka_sec_0c4MBGeR9LN74LzV5uelF9SgeQ32CqfeWpIuieneBbsL57dAAlqqJWDiVDJOlsSx61pVwHMKlsb3uMvU",
146+
scope="email",
147+
)
148+
requests_auth.OAuth2.display.failure_html = "FAILURE: {display_time}\n{information}"
149+
tab = browser_mock.add_response(
150+
opened_url="https://wakatime.com/oauth/authorize?client_id=jPJQV0op6Pu3b66MWDi8b1wD&client_secret=waka_sec_0c4MBGeR9LN74LzV5uelF9SgeQ32CqfeWpIuieneBbsL57dAAlqqJWDiVDJOlsSx61pVwHMKlsb3uMvU&scope=email&response_type=code&state=5d0adb208bdbecaf5cfb6de0bf4ba0aea52986f3fc5ea7bc30c4b2db449c17e5c9d15f9a3926476cdaf1c72e9f73c7cfdc624dde0187c38d8c6b04532770df2a&redirect_uri=http%3A%2F%2Flocalhost%3A5000%2F",
151+
reply_url="http://localhost:5000#error=invalid_request",
152+
displayed_html="FAILURE: {display_time}\n{information}",
153+
)
154+
155+
with pytest.raises(requests_auth.InvalidGrantRequest):
156+
requests.get("http://authorized_only", auth=auth)
157+
158+
tab.assert_failure(
159+
"invalid_request: The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed."
160+
)
161+
162+
96163
def test_multiple_scopes_are_comma_separated(
97164
token_cache, responses: RequestsMock, browser_mock: BrowserMock
98165
):

tests/oauth2/authorization_code_pkce/test_oauth2_authorization_code_pkce.py

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,80 @@ def test_oauth2_pkce_flow_uses_redirect_uri_domain(
101101
tab.assert_success()
102102

103103

104+
def test_oauth2_pkce_flow_uses_custom_success(
105+
token_cache, responses: RequestsMock, monkeypatch, browser_mock: BrowserMock
106+
):
107+
monkeypatch.setattr(
108+
requests_auth._oauth2.authorization_code_pkce.os, "urandom", lambda x: b"1" * 63
109+
)
110+
auth = requests_auth.OAuth2AuthorizationCodePKCE(
111+
"http://provide_code",
112+
"http://provide_access_token",
113+
)
114+
requests_auth.OAuth2.display.success_html = (
115+
"<body><div>SUCCESS: {display_time}</div></body>"
116+
)
117+
tab = browser_mock.add_response(
118+
opened_url="http://provide_code?response_type=code&state=163f0455b3e9cad3ca04254e5a0169553100d3aa0756c7964d897da316a695ffed5b4f46ef305094fd0a88cfe4b55ff257652015e4aa8f87b97513dba440f8de&redirect_uri=http%3A%2F%2Flocalhost%3A5000%2F&code_challenge=5C_ph_KZ3DstYUc965SiqmKAA-ShvKF4Ut7daKd3fjc&code_challenge_method=S256",
119+
reply_url="http://localhost:5000#code=SplxlOBeZQQYbYS6WxSbIA&state=163f0455b3e9cad3ca04254e5a0169553100d3aa0756c7964d897da316a695ffed5b4f46ef305094fd0a88cfe4b55ff257652015e4aa8f87b97513dba440f8de",
120+
displayed_html="<body><div>SUCCESS: {display_time}</div></body>",
121+
)
122+
responses.post(
123+
"http://provide_access_token",
124+
json={
125+
"access_token": "2YotnFZFEjr1zCsicMWpAA",
126+
"token_type": "example",
127+
"expires_in": 3600,
128+
"refresh_token": "tGzv3JOkF0XG5Qx2TlKWIA",
129+
"example_parameter": "example_value",
130+
},
131+
match=[
132+
urlencoded_params_matcher(
133+
{
134+
"code_verifier": "MTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTEx",
135+
"grant_type": "authorization_code",
136+
"redirect_uri": "http://localhost:5000/",
137+
"response_type": "code",
138+
"code": "SplxlOBeZQQYbYS6WxSbIA",
139+
}
140+
),
141+
],
142+
)
143+
responses.get(
144+
"http://authorized_only",
145+
match=[header_matcher({"Authorization": "Bearer 2YotnFZFEjr1zCsicMWpAA"})],
146+
)
147+
148+
requests.get("http://authorized_only", auth=auth)
149+
150+
tab.assert_success()
151+
152+
153+
def test_oauth2_pkce_flow_uses_custom_failure(
154+
token_cache, monkeypatch, browser_mock: BrowserMock
155+
):
156+
monkeypatch.setattr(
157+
requests_auth._oauth2.authorization_code_pkce.os, "urandom", lambda x: b"1" * 63
158+
)
159+
auth = requests_auth.OAuth2AuthorizationCodePKCE(
160+
"http://provide_code",
161+
"http://provide_access_token",
162+
)
163+
requests_auth.OAuth2.display.failure_html = "FAILURE: {display_time}\n{information}"
164+
tab = browser_mock.add_response(
165+
opened_url="http://provide_code?response_type=code&state=163f0455b3e9cad3ca04254e5a0169553100d3aa0756c7964d897da316a695ffed5b4f46ef305094fd0a88cfe4b55ff257652015e4aa8f87b97513dba440f8de&redirect_uri=http%3A%2F%2Flocalhost%3A5000%2F&code_challenge=5C_ph_KZ3DstYUc965SiqmKAA-ShvKF4Ut7daKd3fjc&code_challenge_method=S256",
166+
reply_url="http://localhost:5000#error=invalid_request",
167+
displayed_html="FAILURE: {display_time}\n{information}",
168+
)
169+
170+
with pytest.raises(requests_auth.InvalidGrantRequest):
171+
requests.get("http://authorized_only", auth=auth)
172+
173+
tab.assert_failure(
174+
"invalid_request: The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed."
175+
)
176+
177+
104178
def test_oauth2_pkce_flow_get_code_is_sent_in_authorization_header_by_default(
105179
token_cache, responses: RequestsMock, monkeypatch, browser_mock: BrowserMock
106180
):

tests/oauth2/authorization_code_pkce/test_oauth2_authorization_code_pkce_okta.py

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,82 @@ def test_oauth2_pkce_flow_uses_redirect_uri_domain(
107107
tab.assert_success()
108108

109109

110+
def test_oauth2_pkce_flow_uses_custom_success(
111+
token_cache, responses: RequestsMock, monkeypatch, browser_mock: BrowserMock
112+
):
113+
monkeypatch.setattr(
114+
requests_auth._oauth2.authorization_code_pkce.os, "urandom", lambda x: b"1" * 63
115+
)
116+
auth = requests_auth.OktaAuthorizationCodePKCE(
117+
"testserver.okta-emea.com",
118+
"54239d18-c68c-4c47-8bdd-ce71ea1d50cd",
119+
)
120+
requests_auth.OAuth2.display.success_html = (
121+
"<body><div>SUCCESS: {display_time}</div></body>"
122+
)
123+
tab = browser_mock.add_response(
124+
opened_url="https://testserver.okta-emea.com/oauth2/default/v1/authorize?client_id=54239d18-c68c-4c47-8bdd-ce71ea1d50cd&scope=openid&response_type=code&state=5264d11c8b268ccf911ce564ca42fd75cea68c4a3c1ec3ac1ab20243891ab7cd5250ad4c2d002017c6e8ac2ba34954293baa5e0e4fd00bb9ffd4a39c45f1960b&redirect_uri=http%3A%2F%2Flocalhost%3A5000%2F&code_challenge=5C_ph_KZ3DstYUc965SiqmKAA-ShvKF4Ut7daKd3fjc&code_challenge_method=S256",
125+
reply_url="http://localhost:5000#code=SplxlOBeZQQYbYS6WxSbIA&state=5264d11c8b268ccf911ce564ca42fd75cea68c4a3c1ec3ac1ab20243891ab7cd5250ad4c2d002017c6e8ac2ba34954293baa5e0e4fd00bb9ffd4a39c45f1960b",
126+
displayed_html="<body><div>SUCCESS: {display_time}</div></body>",
127+
)
128+
responses.post(
129+
"https://testserver.okta-emea.com/oauth2/default/v1/token",
130+
json={
131+
"access_token": "2YotnFZFEjr1zCsicMWpAA",
132+
"token_type": "example",
133+
"expires_in": 3600,
134+
"refresh_token": "tGzv3JOkF0XG5Qx2TlKWIA",
135+
"example_parameter": "example_value",
136+
},
137+
match=[
138+
urlencoded_params_matcher(
139+
{
140+
"code_verifier": "MTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTEx",
141+
"grant_type": "authorization_code",
142+
"redirect_uri": "http://localhost:5000/",
143+
"client_id": "54239d18-c68c-4c47-8bdd-ce71ea1d50cd",
144+
"scope": "openid",
145+
"response_type": "code",
146+
"code": "SplxlOBeZQQYbYS6WxSbIA",
147+
}
148+
),
149+
],
150+
)
151+
responses.get(
152+
"http://authorized_only",
153+
match=[header_matcher({"Authorization": "Bearer 2YotnFZFEjr1zCsicMWpAA"})],
154+
)
155+
156+
requests.get("http://authorized_only", auth=auth)
157+
158+
tab.assert_success()
159+
160+
161+
def test_oauth2_pkce_flow_uses_custom_failure(
162+
token_cache, monkeypatch, browser_mock: BrowserMock
163+
):
164+
monkeypatch.setattr(
165+
requests_auth._oauth2.authorization_code_pkce.os, "urandom", lambda x: b"1" * 63
166+
)
167+
auth = requests_auth.OktaAuthorizationCodePKCE(
168+
"testserver.okta-emea.com",
169+
"54239d18-c68c-4c47-8bdd-ce71ea1d50cd",
170+
)
171+
requests_auth.OAuth2.display.failure_html = "FAILURE: {display_time}\n{information}"
172+
tab = browser_mock.add_response(
173+
opened_url="https://testserver.okta-emea.com/oauth2/default/v1/authorize?client_id=54239d18-c68c-4c47-8bdd-ce71ea1d50cd&scope=openid&response_type=code&state=5264d11c8b268ccf911ce564ca42fd75cea68c4a3c1ec3ac1ab20243891ab7cd5250ad4c2d002017c6e8ac2ba34954293baa5e0e4fd00bb9ffd4a39c45f1960b&redirect_uri=http%3A%2F%2Flocalhost%3A5000%2F&code_challenge=5C_ph_KZ3DstYUc965SiqmKAA-ShvKF4Ut7daKd3fjc&code_challenge_method=S256",
174+
reply_url="http://localhost:5000#error=invalid_request",
175+
displayed_html="FAILURE: {display_time}\n{information}",
176+
)
177+
178+
with pytest.raises(requests_auth.InvalidGrantRequest):
179+
requests.get("http://authorized_only", auth=auth)
180+
181+
tab.assert_failure(
182+
"invalid_request: The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed."
183+
)
184+
185+
110186
def test_oauth2_pkce_flow_get_code_is_sent_in_authorization_header_by_default(
111187
token_cache, responses: RequestsMock, monkeypatch, browser_mock: BrowserMock
112188
):

0 commit comments

Comments
 (0)