diff options
author | Jonathan Huot <jonathan.huot@thomsonreuters.com> | 2019-02-21 10:16:55 +0100 |
---|---|---|
committer | Jonathan Huot <jonathan.huot@thomsonreuters.com> | 2019-02-21 10:16:55 +0100 |
commit | 4205dc1b4240e30d966c3fd4fe872f83413b2e2c (patch) | |
tree | 7e530ca577ed8caaa082d12128294566dbea568d | |
parent | 58f1c3fe4020d13d4c2f7b80902b2c157fde807d (diff) | |
download | oauthlib-4205dc1b4240e30d966c3fd4fe872f83413b2e2c.tar.gz |
Add authorization "state" preservation back for AuthCode
-rw-r--r-- | tests/oauth2/rfc6749/endpoints/test_credentials_preservation.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/oauth2/rfc6749/endpoints/test_credentials_preservation.py b/tests/oauth2/rfc6749/endpoints/test_credentials_preservation.py index c77d18e..c0cf86d 100644 --- a/tests/oauth2/rfc6749/endpoints/test_credentials_preservation.py +++ b/tests/oauth2/rfc6749/endpoints/test_credentials_preservation.py @@ -43,6 +43,13 @@ class PreservationTest(TestCase): def test_state_preservation(self): auth_uri = 'http://example.com/path?state=xyz&client_id=abc&response_type=' + # authorization grant + h, _, s = self.web.create_authorization_response( + auth_uri + 'code', scopes=['random']) + self.assertEqual(s, 302) + self.assertIn('Location', h) + self.assertEqual(get_query_credentials(h['Location'])['state'][0], 'xyz') + # implicit grant h, _, s = self.mobile.create_authorization_response( auth_uri + 'token', scopes=['random']) |