]>
git.wh0rd.org - tt-rss.git/blob - plugins/auth_imap/auth_imap.php
3 Put the following options in config.php:
5 define('IMAP_AUTH_SERVER', 'your.imap.server:port');
6 define('IMAP_AUTH_OPTIONS', '/tls/novalidate-cert/norsh');
7 // More about options: http://php.net/manual/ru/function.imap-open.php
10 class Auth_Imap
extends Plugin
implements IAuthModule
{
18 "Authenticates against an IMAP server (configured in config.php)",
23 function init($host) {
24 $this->link
= $host->get_link();
26 $this->base
= new Auth_Base($this->link
);
28 $host->add_hook($host::HOOK_AUTH_USER
, $this);
31 function authenticate($login, $password) {
33 if ($login && $password) {
35 "{".IMAP_AUTH_SERVER
.IMAP_AUTH_OPTIONS
."}INBOX",
42 return $this->base
->auto_create_user($login);