MDL-58126 googledocs: Re-implement the google docs repo

Use latest REST API (v3) - but avoid the google client libraries
(too big, too much to update, not integrated with auth).

Part of MDL-58220
This commit is contained in:
Damyon Wiese
2017-04-03 13:40:13 +08:00
parent 299112498b
commit 0e59638bdb
10 changed files with 372 additions and 167 deletions
-3
View File
@@ -321,9 +321,6 @@ class api {
public static function get_user_oauth_client(issuer $issuer, moodle_url $currenturl, $additionalscopes = '') {
$client = new \core\oauth2\client($issuer, $currenturl, $additionalscopes);
if (!$client->is_logged_in()) {
redirect($client->get_login_url());
}
return $client;
}