4 * admin-client.php Main entry point for the OpenEMR OAUTH2 / SMART client registration management page
5 * Provides functionality to see the list of registered client's and the ability to enable / disable
6 * client registrations.
8 * @link http://www.open-emr.org
9 * @author Stephen Nielson <stephen@nielson.org>
10 * @copyright Copyright (c) 2020 Stephen Nielson <stephen@nielson.org>
11 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
14 // need to make sure our autoloader is present.
15 require_once("../globals.php");
17 use OpenEMR\Common\Acl\AccessDeniedException
;
18 use OpenEMR\Common\Auth\OpenIDConnect\Repositories\ClientRepository
;
19 use OpenEMR\Common\Csrf\CsrfInvalidException
;
20 use OpenEMR\Common\Csrf\CsrfUtils
;
21 use OpenEMR\FHIR\SMART\ClientAdminController
;
22 use OpenEMR\Common\Logging\SystemLogger
;
24 $router = new ClientAdminController(new ClientRepository(), new SystemLogger(), 'admin-client.php');
26 $router->dispatch(($_REQUEST['action'] ??
null), $_REQUEST);
27 } catch (CsrfInvalidException
$exception) {
28 CsrfUtils
::csrfNotVerified();
29 } catch (AccessDeniedException
$exception) {
30 (new SystemLogger())->critical($exception->getMessage(), ["trace" => $exception->getTraceAsString()]);
32 } catch (Exception
$exception) {
33 (new SystemLogger())->error($exception->getMessage(), ["trace" => $exception->getTraceAsString()]);
34 die("Unknown system error occurred");