@@ -64,6 +64,7 @@ def test_post_with_valid_non_standard_scheme_granttype_authcode_clienttype_publi
6464 'scope' : ['capability-a' ],
6565 'expires_in' : 86400 ,
6666 'allow' : True ,
67+ "state" : "0123456789abcdef" ,
6768 'code_challenge' : code_challenge ,
6869 'code_challenge_method' : 'S256' ,
6970 }
@@ -118,6 +119,7 @@ def test_post_with_invalid_non_standard_scheme_granttype_authcode_clienttype_pub
118119 'scope' : ['capability-a' ],
119120 'expires_in' : 86400 ,
120121 'allow' : True ,
122+ "state" : "0123456789abcdef" ,
121123 }
122124 response = self .client .post (reverse ('oauth2_provider:authorize' ), data = payload )
123125 self .assertEqual (response .status_code , 400 )
@@ -159,6 +161,7 @@ def test_post_with_valid_non_standard_scheme_granttype_authcode_clienttype_confi
159161 'scope' : ['capability-a' ],
160162 'expires_in' : 86400 ,
161163 'allow' : True ,
164+ "state" : "0123456789abcdef" ,
162165 'code_challenge' : code_challenge ,
163166 'code_challenge_method' : 'S256' ,
164167 }
@@ -222,6 +225,7 @@ def test_post_with_invalid_non_standard_scheme_granttype_authcode_clienttype_con
222225 'scope' : ['capability-a' ],
223226 'expires_in' : 86400 ,
224227 'allow' : True ,
228+ "state" : "0123456789abcdef" ,
225229 }
226230 response = self .client .post (reverse ('oauth2_provider:authorize' ), data = payload )
227231 self .assertEqual (response .status_code , 400 )
@@ -250,6 +254,7 @@ def test_refresh_token(self):
250254 'scope' : ['capability-a' ],
251255 'expires_in' : 86400 ,
252256 'allow' : True ,
257+ "state" : "0123456789abcdef" ,
253258 }
254259 response = self .client .post (reverse ('oauth2_provider:authorize' ), data = payload )
255260 self .client .logout ()
@@ -305,6 +310,7 @@ def test_refresh_with_expired_token(self):
305310 'scope' : ['capability-a' ],
306311 'expires_in' : 86400 ,
307312 'allow' : True ,
313+ "state" : "0123456789abcdef" ,
308314 }
309315 response = self .client .post (reverse ('oauth2_provider:authorize' ), data = payload )
310316 self .client .logout ()
@@ -361,6 +367,7 @@ def test_refresh_13_month_with_expired_grant(self):
361367 'scope' : ['capability-a' ],
362368 'expires_in' : 86400 ,
363369 'allow' : True ,
370+ "state" : "0123456789abcdef" ,
364371 }
365372 response = self .client .post (reverse ('oauth2_provider:authorize' ), data = payload )
366373 self .client .logout ()
@@ -425,6 +432,7 @@ def test_refresh_with_one_time_access_retrieve_app_using_refresh_token(self):
425432 'scope' : ['capability-a' ],
426433 'expires_in' : 86400 ,
427434 'allow' : True ,
435+ "state" : "0123456789abcdef" ,
428436 }
429437 response = self .client .post (reverse ('oauth2_provider:authorize' ), data = payload )
430438 self .client .logout ()
@@ -480,6 +488,7 @@ def test_refresh_with_one_time_access_retrieve_app_from_auth_header(self):
480488 'scope' : ['capability-a' ],
481489 'expires_in' : 86400 ,
482490 'allow' : True ,
491+ "state" : "0123456789abcdef" ,
483492 }
484493 response = self .client .post (reverse ('oauth2_provider:authorize' ), data = payload )
485494 self .client .logout ()
@@ -550,6 +559,7 @@ def test_dag_expiration_exists(self):
550559 'scope' : ['capability-a' ],
551560 'expires_in' : 86400 ,
552561 'allow' : True ,
562+ "state" : "0123456789abcdef" ,
553563 }
554564 response = self .client .post (reverse ('oauth2_provider:authorize' ), data = payload )
555565 self .client .logout ()
@@ -594,6 +604,7 @@ def test_revoke_endpoint(self):
594604 'scope' : ['capability-a' ],
595605 'expires_in' : 86400 ,
596606 'allow' : True ,
607+ "state" : "0123456789abcdef" ,
597608 }
598609 response = self .client .post (reverse ('oauth2_provider:authorize' ), data = payload )
599610 self .client .logout ()
@@ -649,6 +660,7 @@ def test_refresh_with_revoked_token(self):
649660 'scope' : ['capability-a' ],
650661 'expires_in' : 86400 ,
651662 'allow' : True ,
663+ "state" : "0123456789abcdef" ,
652664 }
653665 response = self .client .post (reverse ('oauth2_provider:authorize' ), data = payload )
654666 self .client .logout ()
@@ -715,6 +727,7 @@ def test_application_delete_after_auth(self):
715727 'scope' : ['capability-a' ],
716728 'expires_in' : 86400 ,
717729 'allow' : True ,
730+ "state" : "0123456789abcdef" ,
718731 }
719732 response = self .client .post (reverse ('oauth2_provider:authorize' ), data = payload )
720733 self .client .logout ()
@@ -771,6 +784,7 @@ def test_user_delete_after_auth(self):
771784 'scope' : ['capability-a' ],
772785 'expires_in' : 86400 ,
773786 'allow' : True ,
787+ "state" : "0123456789abcdef" ,
774788 }
775789 response = self .client .post (reverse ('oauth2_provider:authorize' ), data = payload )
776790 self .client .logout ()
@@ -831,6 +845,7 @@ def test_revoked_token_on_inactive_app(self):
831845 'scope' : ['capability-a' ],
832846 'expires_in' : 86400 ,
833847 'allow' : True ,
848+ "state" : "0123456789abcdef" ,
834849 }
835850 response = self .client .post (reverse ('oauth2_provider:authorize' ), data = payload )
836851 self .client .logout ()
@@ -900,6 +915,7 @@ def test_introspect_token_on_inactive_app(self):
900915 'scope' : ['capability-a' , 'capability-b' , 'introspection' ],
901916 'expires_in' : 86400 ,
902917 'allow' : True ,
918+ "state" : "0123456789abcdef" ,
903919 }
904920 response = self .client .post (reverse ('oauth2_provider:authorize' ), data = payload )
905921 self .client .logout ()
@@ -986,6 +1002,7 @@ def _execute_token_endpoint(self, token_path):
9861002 'scope' : ['capability-a' ],
9871003 'expires_in' : 86400 ,
9881004 'allow' : True ,
1005+ "state" : "0123456789abcdef" ,
9891006 }
9901007 response = self .client .post (reverse ('oauth2_provider:authorize' ), data = payload )
9911008 self .client .logout ()
0 commit comments