mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-01 21:49:21 +03:00
Simplify LoginProcess handling
This commit is contained in:
parent
6be84f8ab4
commit
3017f8c656
9 changed files with 24 additions and 47 deletions
|
|
@ -6,9 +6,9 @@ class LoginExternalPlugin extends \RainLoop\Plugins\AbstractPlugin
|
|||
NAME = 'Login External',
|
||||
AUTHOR = 'SnappyMail',
|
||||
URL = 'https://snappymail.eu/',
|
||||
VERSION = '1.2',
|
||||
RELEASE = '2023-03-14',
|
||||
REQUIRED = '2.27.0',
|
||||
VERSION = '1.3',
|
||||
RELEASE = '2024-03-27',
|
||||
REQUIRED = '2.36.1',
|
||||
CATEGORY = 'Login',
|
||||
LICENSE = 'MIT',
|
||||
DESCRIPTION = 'Login with $_POST["Email"] and $_POST["Password"] from anywhere';
|
||||
|
|
@ -32,9 +32,7 @@ class LoginExternalPlugin extends \RainLoop\Plugins\AbstractPlugin
|
|||
try
|
||||
{
|
||||
$oAccount = $oActions->LoginProcess($sEmail, $sPassword);
|
||||
if ($oAccount instanceof \RainLoop\Model\MainAccount) {
|
||||
$oActions->SetAuthToken($oAccount);
|
||||
} else {
|
||||
if (!$oAccount instanceof \RainLoop\Model\MainAccount) {
|
||||
$oAccount = null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@ class LoginOAuth2Plugin extends \RainLoop\Plugins\AbstractPlugin
|
|||
{
|
||||
const
|
||||
NAME = 'OAuth2',
|
||||
VERSION = '1.2',
|
||||
RELEASE = '2024-03-12',
|
||||
REQUIRED = '2.35.3',
|
||||
VERSION = '1.3',
|
||||
RELEASE = '2024-03-27',
|
||||
REQUIRED = '2.36.1',
|
||||
CATEGORY = 'Login',
|
||||
DESCRIPTION = 'IMAP, Sieve & SMTP login using RFC 7628 OAuth2';
|
||||
|
||||
|
|
@ -91,7 +91,6 @@ class LoginOAuth2Plugin extends \RainLoop\Plugins\AbstractPlugin
|
|||
{
|
||||
$oAccount = $oActions->LoginProcess($sEmail, $sPassword);
|
||||
if ($oAccount instanceof \RainLoop\Model\Account) {
|
||||
$oActions->AuthToken($oAccount);
|
||||
$iErrorCode = 0;
|
||||
} else {
|
||||
$oAccount = null;
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ class LoginRemotePlugin extends \RainLoop\Plugins\AbstractPlugin
|
|||
NAME = 'Login Remote',
|
||||
AUTHOR = 'SnappyMail',
|
||||
URL = 'https://snappymail.eu/',
|
||||
VERSION = '1.3',
|
||||
RELEASE = '2023-03-14',
|
||||
REQUIRED = '2.27.0',
|
||||
VERSION = '1.4',
|
||||
RELEASE = '2024-03-27',
|
||||
REQUIRED = '2.36.1',
|
||||
CATEGORY = 'Login',
|
||||
LICENSE = 'MIT',
|
||||
DESCRIPTION = 'Tries to login using the $_ENV["REMOTE_*"] variables';
|
||||
|
|
@ -44,9 +44,6 @@ class LoginRemotePlugin extends \RainLoop\Plugins\AbstractPlugin
|
|||
{
|
||||
static::$login = true;
|
||||
$oAccount = $oActions->LoginProcess($sEmail, $sPassword);
|
||||
if ($oAccount instanceof \RainLoop\Model\MainAccount) {
|
||||
$oActions->SetAuthToken($oAccount);
|
||||
}
|
||||
}
|
||||
catch (\Throwable $oException)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ class ProxyAuthPlugin extends \RainLoop\Plugins\AbstractPlugin
|
|||
NAME = 'Proxy Auth',
|
||||
AUTHOR = 'Philipp',
|
||||
URL = 'https://www.mundhenk.org/',
|
||||
VERSION = '0.2',
|
||||
RELEASE = '2024-01-22',
|
||||
REQUIRED = '2.27.0',
|
||||
VERSION = '0.3',
|
||||
RELEASE = '2024-03-27',
|
||||
REQUIRED = '2.36.1',
|
||||
CATEGORY = 'Login',
|
||||
LICENSE = 'MIT',
|
||||
DESCRIPTION = 'Uses HTTP Remote-User and (Dovecot) master user for login';
|
||||
|
|
@ -124,9 +124,6 @@ class ProxyAuthPlugin extends \RainLoop\Plugins\AbstractPlugin
|
|||
{
|
||||
static::$login = true;
|
||||
$oAccount = $oActions->LoginProcess($sEmail, $sPassword);
|
||||
if ($oAccount instanceof \RainLoop\Model\MainAccount) {
|
||||
$oActions->SetAuthToken($oAccount);
|
||||
}
|
||||
}
|
||||
catch (\Throwable $oException)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue