mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
MDL-39203 repository: Fixed authentication errors with Dropbox
This commit is contained in:
parent
9b81eef05d
commit
926a3512a5
@ -264,6 +264,8 @@ class oauth_helper {
|
|||||||
$this->sign_secret = $this->consumer_secret.'&'.$secret;
|
$this->sign_secret = $this->consumer_secret.'&'.$secret;
|
||||||
$params = $this->prepare_oauth_parameters($this->access_token_api, array('oauth_token'=>$token, 'oauth_verifier'=>$verifier), 'POST');
|
$params = $this->prepare_oauth_parameters($this->access_token_api, array('oauth_token'=>$token, 'oauth_verifier'=>$verifier), 'POST');
|
||||||
$this->setup_oauth_http_header($params);
|
$this->setup_oauth_http_header($params);
|
||||||
|
// Should never send the callback in this request.
|
||||||
|
unset($params['oauth_callback']);
|
||||||
$content = $this->http->post($this->access_token_api, $params, $this->http_options);
|
$content = $this->http->post($this->access_token_api, $params, $this->http_options);
|
||||||
$keys = $this->parse_result($content);
|
$keys = $this->parse_result($content);
|
||||||
$this->set_access_token($keys['oauth_token'], $keys['oauth_token_secret']);
|
$this->set_access_token($keys['oauth_token'], $keys['oauth_token_secret']);
|
||||||
|
@ -90,7 +90,7 @@ class repository_dropbox extends repository {
|
|||||||
'oauth_consumer_key'=>$this->dropbox_key,
|
'oauth_consumer_key'=>$this->dropbox_key,
|
||||||
'oauth_consumer_secret'=>$this->dropbox_secret,
|
'oauth_consumer_secret'=>$this->dropbox_secret,
|
||||||
'oauth_callback' => $callbackurl->out(false),
|
'oauth_callback' => $callbackurl->out(false),
|
||||||
'api_root' => 'https://www.dropbox.com/1/oauth',
|
'api_root' => 'https://api.dropbox.com/1/oauth',
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->dropbox = new dropbox($args);
|
$this->dropbox = new dropbox($args);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user