mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 21:19:21 +03:00
Better Domain management with simplified SASL Mechanisms support
This commit is contained in:
parent
6c6e73f448
commit
5a17e3b51d
12 changed files with 85 additions and 176 deletions
|
|
@ -8,7 +8,7 @@ class LoginOAuth2Plugin extends \RainLoop\Plugins\AbstractPlugin
|
|||
RELEASE = '2021-11-12',
|
||||
REQUIRED = '2.9.1',
|
||||
CATEGORY = 'Login',
|
||||
DESCRIPTION = 'IMAP, Sieve & SMTP login using OAuth2';
|
||||
DESCRIPTION = 'IMAP, Sieve & SMTP login using RFC 7628 OAuth2';
|
||||
|
||||
const
|
||||
LOGIN_URI = 'https://accounts.google.com/o/oauth2/auth',
|
||||
|
|
@ -57,7 +57,7 @@ class LoginOAuth2Plugin extends \RainLoop\Plugins\AbstractPlugin
|
|||
}
|
||||
if ($sAccessToken && $sRefreshToken) {
|
||||
$aCredentials['Password'] = $this->gmailRefreshToken($sAccessToken, $sRefreshToken);
|
||||
$aCredentials['UseAuthOAuth2IfSupported'] = true;
|
||||
\array_unshift($aCredentials['SASLMechanisms'], 'OAUTHBEARER', 'XOAUTH2');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue