fix: access_token be an Array

pull/187/head
qkqpttgf 2021-01-15 19:26:39 +08:00 committed by GitHub
parent 0b0f80c135
commit 27ec89e172
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ class Onedrive {
$this->oauth_url = 'https://login.microsoftonline.com/common/oauth2/v2.0/';
$this->api_url = 'https://graph.microsoft.com/v1.0';
$this->scope = 'https://graph.microsoft.com/Files.ReadWrite.All offline_access';
$this->access_token = $this->get_access_token(getConfig('refresh_token', $tag));
$res = $this->get_access_token(getConfig('refresh_token', $tag));
$this->client_secret = urlencode($this->client_secret);
$this->scope = urlencode($this->scope);
@ -732,7 +732,7 @@ class Onedrive {
savecache('access_token', $this->access_token, $this->disktag, $ret['expires_in'] - 300);
if (time()>getConfig('token_expires', $this->disktag)) setConfig([ 'refresh_token' => $ret['refresh_token'], 'token_expires' => time()+7*24*60*60 ], $this->disktag);
}
return $this->access_token;
return true;
}
protected function get_siteid($sharepointSite)