mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-01 05:29:20 +03:00
Drop support for IMAP PROXYAUTH as it is a non-standard X-NETSCAPE thing
This commit is contained in:
parent
521f5e0d08
commit
fd54796710
8 changed files with 2 additions and 126 deletions
|
|
@ -1,20 +0,0 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 RainLoop Team
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
<?php
|
||||
|
||||
use RainLoop\Model\MainAccount;
|
||||
|
||||
class ProxyauthLoginExamplePlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||
{
|
||||
const
|
||||
NAME = 'Proxy Auth Login Example',
|
||||
VERSION = '2.2',
|
||||
RELEASE = '2023-10-24',
|
||||
REQUIRED = '2.23.0',
|
||||
CATEGORY = 'General',
|
||||
DESCRIPTION = '';
|
||||
|
||||
public function Init() : void
|
||||
{
|
||||
$this->addHook('login.success', 'EventLoginPostLoginProvide');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sLogin
|
||||
* @param string $sPassword
|
||||
*/
|
||||
public function isValidAccount($sLogin, $sPassword)
|
||||
{
|
||||
return !empty($sLogin) && !empty($sPassword);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \RainLoop\Model\Account $oAccount
|
||||
*/
|
||||
public function EventLoginPostLoginProvide(MainAccount $oAccount)
|
||||
{
|
||||
// Verify logic
|
||||
if (!$this->isValidAccount($oAccount->IncLogin(), $oAccount->IncPassword())) {
|
||||
// throw a Auth Error Exception
|
||||
throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::AuthError);
|
||||
}
|
||||
|
||||
$oAccount->SetProxyAuthUser('admin@domain.com');
|
||||
$oAccount->SetProxyAuthPassword('secret-admin-password');
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue