egroupware_official/api/oauth.php
ralf dc832ce12b WIP OAuth/OpenIDConnect authentication for mail / Office365 mail services
Mail wizzard triggers on a *.onmicrosoft.com domain and then automatically uses Office365 servers with OpenIDConnect authentication
- access- and refresh-token get acquired with https://outlook.office.com/IMAP.AccessAsUser.All scope
ToDo:
- find out why Microsoft denies access with the returned access-token
- store access-token for its lifetime in the cache
- store refresh-token instead of password, to get a new access-token, if it's expired
--> add OAuth logic to mail client (not just wizard)
2022-12-23 14:33:19 -06:00

24 lines
579 B
PHP

<?php
/**
* EGroupware Api: OpenIDConnectClient redirect endpoint
*
* @link https://www.egroupware.org
* @package api
* @subpackage mail
* @author Ralf Becker <rb@egroupware.org>
* @copyright (c) 2013-22 by Ralf Becker <rb@egroupware.org>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
*/
$GLOBALS['egw_info'] = [
'flags' => [
'currentapp' => 'api',
'nonavbar' => true,
'noheader' => true,
],
];
require_once __DIR__.'/../header.inc.php';
use EGroupware\Api\Auth\OpenIDConnectClient;
OpenIDConnectClient::process();