mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-16 17:44:41 +00:00
sync with master
This commit is contained in:
parent
f91f54d009
commit
9ff1915778
@ -28,6 +28,10 @@
|
||||
*/
|
||||
namespace Google\API;
|
||||
|
||||
/**
|
||||
* Class Drive wrapper around Google API for Drive support
|
||||
* @package Google\API
|
||||
*/
|
||||
class Drive
|
||||
{
|
||||
/**
|
||||
@ -62,6 +66,11 @@ class Drive
|
||||
$key
|
||||
);
|
||||
$this->client->setAssertionCredentials($cred);
|
||||
$this->client->setApplicationName("OPNsense");
|
||||
$this->client->setAssertionCredentials($cred);
|
||||
if ($this->client->getAuth()->isAccessTokenExpired()) {
|
||||
$this->client->getAuth()->refreshTokenWithAssertion($cred);
|
||||
}
|
||||
|
||||
$this->service = new \Google_Service_Drive($this->client);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user