PMCORE-3929 MS Modern Authentication / GMAIL API IMAP for ABE

This commit is contained in:
Julio Cesar Laura Avendaño
2022-08-18 19:30:28 +00:00
parent 4189165ce5
commit 53375b02e3
10 changed files with 1845 additions and 633 deletions

View File

@@ -20,11 +20,10 @@ try {
$office365Client = $office365OAuth->getOffice365Client();
$accessToken = $office365Client->getAccessToken('authorization_code', [
'code' => $_GET['code']
'code' => $_GET['code'],
'scope' => Office365OAuth::SMTP_SCOPE
]);
$token = $accessToken->getToken();
$office365OAuth->setRefreshToken($accessToken->getRefreshToken());
$office365OAuth->saveEmailServer();