@@ -64,6 +64,7 @@ def test_post_with_valid_non_standard_scheme_granttype_authcode_clienttype_publi
64
64
'scope' : ['capability-a' ],
65
65
'expires_in' : 86400 ,
66
66
'allow' : True ,
67
+ "state" : "0123456789abcdef" ,
67
68
'code_challenge' : code_challenge ,
68
69
'code_challenge_method' : 'S256' ,
69
70
}
@@ -118,6 +119,7 @@ def test_post_with_invalid_non_standard_scheme_granttype_authcode_clienttype_pub
118
119
'scope' : ['capability-a' ],
119
120
'expires_in' : 86400 ,
120
121
'allow' : True ,
122
+ "state" : "0123456789abcdef" ,
121
123
}
122
124
response = self .client .post (reverse ('oauth2_provider:authorize' ), data = payload )
123
125
self .assertEqual (response .status_code , 400 )
@@ -159,6 +161,7 @@ def test_post_with_valid_non_standard_scheme_granttype_authcode_clienttype_confi
159
161
'scope' : ['capability-a' ],
160
162
'expires_in' : 86400 ,
161
163
'allow' : True ,
164
+ "state" : "0123456789abcdef" ,
162
165
'code_challenge' : code_challenge ,
163
166
'code_challenge_method' : 'S256' ,
164
167
}
@@ -222,6 +225,7 @@ def test_post_with_invalid_non_standard_scheme_granttype_authcode_clienttype_con
222
225
'scope' : ['capability-a' ],
223
226
'expires_in' : 86400 ,
224
227
'allow' : True ,
228
+ "state" : "0123456789abcdef" ,
225
229
}
226
230
response = self .client .post (reverse ('oauth2_provider:authorize' ), data = payload )
227
231
self .assertEqual (response .status_code , 400 )
@@ -250,6 +254,7 @@ def test_refresh_token(self):
250
254
'scope' : ['capability-a' ],
251
255
'expires_in' : 86400 ,
252
256
'allow' : True ,
257
+ "state" : "0123456789abcdef" ,
253
258
}
254
259
response = self .client .post (reverse ('oauth2_provider:authorize' ), data = payload )
255
260
self .client .logout ()
@@ -305,6 +310,7 @@ def test_refresh_with_expired_token(self):
305
310
'scope' : ['capability-a' ],
306
311
'expires_in' : 86400 ,
307
312
'allow' : True ,
313
+ "state" : "0123456789abcdef" ,
308
314
}
309
315
response = self .client .post (reverse ('oauth2_provider:authorize' ), data = payload )
310
316
self .client .logout ()
@@ -361,6 +367,7 @@ def test_refresh_13_month_with_expired_grant(self):
361
367
'scope' : ['capability-a' ],
362
368
'expires_in' : 86400 ,
363
369
'allow' : True ,
370
+ "state" : "0123456789abcdef" ,
364
371
}
365
372
response = self .client .post (reverse ('oauth2_provider:authorize' ), data = payload )
366
373
self .client .logout ()
@@ -425,6 +432,7 @@ def test_refresh_with_one_time_access_retrieve_app_using_refresh_token(self):
425
432
'scope' : ['capability-a' ],
426
433
'expires_in' : 86400 ,
427
434
'allow' : True ,
435
+ "state" : "0123456789abcdef" ,
428
436
}
429
437
response = self .client .post (reverse ('oauth2_provider:authorize' ), data = payload )
430
438
self .client .logout ()
@@ -480,6 +488,7 @@ def test_refresh_with_one_time_access_retrieve_app_from_auth_header(self):
480
488
'scope' : ['capability-a' ],
481
489
'expires_in' : 86400 ,
482
490
'allow' : True ,
491
+ "state" : "0123456789abcdef" ,
483
492
}
484
493
response = self .client .post (reverse ('oauth2_provider:authorize' ), data = payload )
485
494
self .client .logout ()
@@ -550,6 +559,7 @@ def test_dag_expiration_exists(self):
550
559
'scope' : ['capability-a' ],
551
560
'expires_in' : 86400 ,
552
561
'allow' : True ,
562
+ "state" : "0123456789abcdef" ,
553
563
}
554
564
response = self .client .post (reverse ('oauth2_provider:authorize' ), data = payload )
555
565
self .client .logout ()
@@ -594,6 +604,7 @@ def test_revoke_endpoint(self):
594
604
'scope' : ['capability-a' ],
595
605
'expires_in' : 86400 ,
596
606
'allow' : True ,
607
+ "state" : "0123456789abcdef" ,
597
608
}
598
609
response = self .client .post (reverse ('oauth2_provider:authorize' ), data = payload )
599
610
self .client .logout ()
@@ -649,6 +660,7 @@ def test_refresh_with_revoked_token(self):
649
660
'scope' : ['capability-a' ],
650
661
'expires_in' : 86400 ,
651
662
'allow' : True ,
663
+ "state" : "0123456789abcdef" ,
652
664
}
653
665
response = self .client .post (reverse ('oauth2_provider:authorize' ), data = payload )
654
666
self .client .logout ()
@@ -715,6 +727,7 @@ def test_application_delete_after_auth(self):
715
727
'scope' : ['capability-a' ],
716
728
'expires_in' : 86400 ,
717
729
'allow' : True ,
730
+ "state" : "0123456789abcdef" ,
718
731
}
719
732
response = self .client .post (reverse ('oauth2_provider:authorize' ), data = payload )
720
733
self .client .logout ()
@@ -771,6 +784,7 @@ def test_user_delete_after_auth(self):
771
784
'scope' : ['capability-a' ],
772
785
'expires_in' : 86400 ,
773
786
'allow' : True ,
787
+ "state" : "0123456789abcdef" ,
774
788
}
775
789
response = self .client .post (reverse ('oauth2_provider:authorize' ), data = payload )
776
790
self .client .logout ()
@@ -831,6 +845,7 @@ def test_revoked_token_on_inactive_app(self):
831
845
'scope' : ['capability-a' ],
832
846
'expires_in' : 86400 ,
833
847
'allow' : True ,
848
+ "state" : "0123456789abcdef" ,
834
849
}
835
850
response = self .client .post (reverse ('oauth2_provider:authorize' ), data = payload )
836
851
self .client .logout ()
@@ -900,6 +915,7 @@ def test_introspect_token_on_inactive_app(self):
900
915
'scope' : ['capability-a' , 'capability-b' , 'introspection' ],
901
916
'expires_in' : 86400 ,
902
917
'allow' : True ,
918
+ "state" : "0123456789abcdef" ,
903
919
}
904
920
response = self .client .post (reverse ('oauth2_provider:authorize' ), data = payload )
905
921
self .client .logout ()
@@ -986,6 +1002,7 @@ def _execute_token_endpoint(self, token_path):
986
1002
'scope' : ['capability-a' ],
987
1003
'expires_in' : 86400 ,
988
1004
'allow' : True ,
1005
+ "state" : "0123456789abcdef" ,
989
1006
}
990
1007
response = self .client .post (reverse ('oauth2_provider:authorize' ), data = payload )
991
1008
self .client .logout ()
0 commit comments