mirror of
https://github.com/moodle/moodle.git
synced 2025-08-02 23:59:41 +02:00
MDL-33507 - oauth2lib: switch 'code' to oauth2code
To avoid param collisions in future.
This commit is contained in:
parent
5df1b73748
commit
7b61ac39d2
2 changed files with 2 additions and 2 deletions
|
@ -39,7 +39,7 @@ $redirecturl = new moodle_url($state);
|
|||
$params = $redirecturl->params();
|
||||
|
||||
if (isset($params['sesskey']) and confirm_sesskey($params['sesskey'])) {
|
||||
$redirecturl->param('code', $code);
|
||||
$redirecturl->param('oauth2code', $code);
|
||||
redirect($redirecturl);
|
||||
} else {
|
||||
print_error('invalidsesskey');
|
||||
|
|
|
@ -425,7 +425,7 @@ abstract class oauth2_client extends curl {
|
|||
|
||||
// If we've been passed then authorization code generated by the
|
||||
// authorization server try and upgrade the token to an access token.
|
||||
$code = optional_param('code', null, PARAM_RAW);
|
||||
$code = optional_param('oauth2code', null, PARAM_RAW);
|
||||
if ($code && $this->upgrade_token($code)) {
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue