Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117802648
D5130.1775268911.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D5130.1775268911.diff
View Options
diff --git a/plugins/kolab_files/kolab_files.php b/plugins/kolab_files/kolab_files.php
--- a/plugins/kolab_files/kolab_files.php
+++ b/plugins/kolab_files/kolab_files.php
@@ -36,8 +36,14 @@
{
$this->rc = rcube::get_instance();
+ if (isset($this->rc->oauth)) {
+ // This will trigger oauth_refresh_token if necessary
+ $this->rc->oauth->is_token_valid();
+ }
+
// Register hooks
$this->add_hook('refresh', [$this, 'refresh']);
+ $this->add_hook('oauth_refresh_token', [$this, 'oauth_refresh_token']);
// Plugin actions for other tasks
$this->register_action('plugin.kolab_files', [$this, 'actions']);
@@ -129,6 +135,15 @@
return $args;
}
+ /**
+ * oauth_refresh_token hook handler
+ */
+ public function oauth_refresh_token($args)
+ {
+ // Force a new chwala session, which will update the credentials (which hold the oauth token)
+ $_SESSION['kolab_files_token'] = null;
+ }
+
/**
* Engine actions handler
*/
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 4, 2:15 AM (15 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18820370
Default Alt Text
D5130.1775268911.diff (1 KB)
Attached To
Mode
D5130: Clear the kolab_files_token on oauth token refresh
Attached
Detach File
Event Timeline