diff options
author | Pieter Ennes <pieter@authentiq.com> | 2017-09-13 23:18:07 +0100 |
---|---|---|
committer | Pieter Ennes <pieter@authentiq.com> | 2017-09-17 21:08:08 +0100 |
commit | 8437a24625aca5623b385aeba5e873f051871306 (patch) | |
tree | 3811974a1114d28a386fa14f889f41fe296f9f28 /tests/oauth2/rfc6749/endpoints | |
parent | 32319c82375e1d892c8bab258ce57686793e00df (diff) | |
download | oauthlib-8437a24625aca5623b385aeba5e873f051871306.tar.gz |
Add test for nonce parameter preservation.
Diffstat (limited to 'tests/oauth2/rfc6749/endpoints')
-rw-r--r-- | tests/oauth2/rfc6749/endpoints/test_openid_connect_params_handling.py (renamed from tests/oauth2/rfc6749/endpoints/test_prompt_handling.py) | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/oauth2/rfc6749/endpoints/test_prompt_handling.py b/tests/oauth2/rfc6749/endpoints/test_openid_connect_params_handling.py index 35e1508..89431b6 100644 --- a/tests/oauth2/rfc6749/endpoints/test_prompt_handling.py +++ b/tests/oauth2/rfc6749/endpoints/test_openid_connect_params_handling.py @@ -29,6 +29,8 @@ class OpenIDConnectEndpointTest(TestCase): response_types={'code': grant}) params = { 'prompt': 'consent', + 'display': 'touch', + 'nonce': 'abcd', 'state': 'abc', 'redirect_uri': 'https://a.b/cb', 'response_type': 'code', @@ -71,3 +73,13 @@ class OpenIDConnectEndpointTest(TestCase): url = 'http://a.b/path?' + urlencode(params) with self.assertRaises(InvalidRequestError): self.endpoint.validate_authorization_request(url) + + def test_oidc_params_preservation(self): + """ + Test that the nonce parameter is passed through. + """ + scopes, creds = self.endpoint.validate_authorization_request(self.url) + + self.assertEqual(creds['prompt'], {'consent'}) + self.assertEqual(creds['nonce'], 'abcd') + self.assertEqual(creds['display'], 'touch') |