From aef92798c8f499d9425e37924f0c890dfb0bd9eb Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Fri, 12 Feb 2021 15:55:42 -0800 Subject: [PATCH] authx - Add page to check identity ('civicrm/authx/id') --- ext/authx/CRM/Authx/Page/Id.php | 20 ++++++++++++++++++++ ext/authx/xml/Menu/authx.xml | 9 +++++++++ 2 files changed, 29 insertions(+) create mode 100644 ext/authx/CRM/Authx/Page/Id.php create mode 100644 ext/authx/xml/Menu/authx.xml diff --git a/ext/authx/CRM/Authx/Page/Id.php b/ext/authx/CRM/Authx/Page/Id.php new file mode 100644 index 0000000000..24c14dfd4b --- /dev/null +++ b/ext/authx/CRM/Authx/Page/Id.php @@ -0,0 +1,20 @@ + CRM_Core_Session::getLoggedInContactID(), + 'user_id' => $authxUf->getCurrentUserId(), + ]; + + CRM_Utils_System::setHttpHeader('Content-Type', 'application/json'); + echo json_encode($response); + CRM_Utils_System::civiExit(); + } + +} diff --git a/ext/authx/xml/Menu/authx.xml b/ext/authx/xml/Menu/authx.xml new file mode 100644 index 0000000000..c0b893aedd --- /dev/null +++ b/ext/authx/xml/Menu/authx.xml @@ -0,0 +1,9 @@ + + + + civicrm/authx/id + CRM_Authx_Page_Id + Id + *always allow* + + -- 2.25.1