[VD:FlysystemGoogleDriveNetmount] show refresh_token into debug tab with debug mode

This commit is contained in:
nao-pon
2020-01-11 20:59:47 +09:00
parent 08f83dac8c
commit 387fcbdbbf
@@ -337,4 +337,18 @@ class elFinderVolumeFlysystemGoogleDriveNetmount extends ExtDriver
return $this->netMountKey . substr(substr($stat['hash'], strlen($this->id)), -38) . $stat['ts'] . '.png';
}
/**
* Return debug info for client.
*
* @return array
**/
public function debug()
{
$res = parent::debug();
if (!empty($this->options['netkey']) && empty($this->options['refresh_token']) && $this->options['access_token'] && isset($this->options['access_token']['refresh_token'])) {
$res['refresh_token'] = $this->options['access_token']['refresh_token'];
}
return $res;
}
}