Commit a3c085e
authored
pass PKCE fields to AuthorizationView form (#896)
* add tests for issue of PKCE authorization code GET request * pass PKCE fields to AuthorizationView form Pass code_challenge and code_challenge_method from query string to AuthorizationView form in get(). Without this, it was impossible to use authorization code grant flow with GET, because code_challenge and code_challenge_method data were never passed to form, so they weren't in form.cleaned_data, which causes creating Grant with always empty code_challenge and code_challenge_method. This issue was quite hard bug to discover because there are already few tests for authorization code flow pkce, however, they weren't checking form rendering in GET request, but only response.status_code, I have added asserts for these 2 values, please look at the changes in test_public_pkce_plain_authorize_get and test_public_pkce_S256_authorize_get tests in test_authorization_code.py.1 parent 6f08e3b commit a3c085e
File tree
3 files changed
+12
-5
lines changed- oauth2_provider/views
- tests
3 files changed
+12
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
| 34 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
159 | 163 | | |
160 | 164 | | |
161 | 165 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1012 | 1012 | | |
1013 | 1013 | | |
1014 | 1014 | | |
1015 | | - | |
| 1015 | + | |
1016 | 1016 | | |
1017 | 1017 | | |
1018 | 1018 | | |
| |||
1033 | 1033 | | |
1034 | 1034 | | |
1035 | 1035 | | |
1036 | | - | |
| 1036 | + | |
| 1037 | + | |
1037 | 1038 | | |
1038 | 1039 | | |
1039 | 1040 | | |
1040 | 1041 | | |
1041 | 1042 | | |
1042 | 1043 | | |
1043 | | - | |
| 1044 | + | |
1044 | 1045 | | |
1045 | 1046 | | |
1046 | 1047 | | |
| |||
1061 | 1062 | | |
1062 | 1063 | | |
1063 | 1064 | | |
1064 | | - | |
| 1065 | + | |
| 1066 | + | |
1065 | 1067 | | |
1066 | 1068 | | |
1067 | 1069 | | |
| |||
0 commit comments