updates
This commit is contained in:
parent
8a04151bd2
commit
7e5ceae907
|
|
@ -8,4 +8,4 @@
|
|||
"php": ">=7.0.0",
|
||||
"roundcube/plugin-installer": ">=0.1.3"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
/**
|
||||
* Email Configuration Plugin - Client Side
|
||||
*/
|
||||
if (window.rcmail) {
|
||||
rcmail.addEventListener('init', function(evt) {
|
||||
rcmail.register_command('email_config_open', function() {
|
||||
rcmail.http_post('plugin.email_config_generate_url', {},
|
||||
rcmail.set_busy(true, 'loading'));
|
||||
}, true);
|
||||
});
|
||||
|
||||
rcmail.addEventListener('responseafterplugin.email_config_generate_url', function(response) {
|
||||
rcmail.set_busy(false);
|
||||
if (response && response.url) {
|
||||
window.open(response.url, '_blank');
|
||||
} else {
|
||||
rcmail.display_message('Failed to generate configuration URL', 'error');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -34,7 +34,7 @@ class email_config extends rcube_plugin
|
|||
$rcmail = rcube::get_instance();
|
||||
$email = $rcmail->user->get_username();
|
||||
$secret_key = 'SHARED_SECRET_KEY_987654321';
|
||||
$config_url = 'http://localhost:3008';
|
||||
$config_url = 'https://config.email-bayarea.com';
|
||||
$expires = time() + 3600;
|
||||
$data = $email . '|' . $expires;
|
||||
$signature = hash_hmac('sha256', $data, $secret_key);
|
||||
|
|
@ -72,4 +72,4 @@ class email_config extends rcube_plugin
|
|||
|
||||
return $out;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue