From 7194613fb7fe72b40578e3a5dc0429a54b8771c8 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Tue, 28 Mar 2023 22:35:10 -0700 Subject: [PATCH] authx - Simplify service declaration --- ext/authx/Civi/Authx/CheckCredential.php | 5 ++++- ext/authx/authx.php | 7 ------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/ext/authx/Civi/Authx/CheckCredential.php b/ext/authx/Civi/Authx/CheckCredential.php index 61368f84e3..7d2ded378e 100644 --- a/ext/authx/Civi/Authx/CheckCredential.php +++ b/ext/authx/Civi/Authx/CheckCredential.php @@ -11,13 +11,16 @@ namespace Civi\Authx; +use Civi\Core\Service\AutoService; use Civi\Crypto\Exception\CryptoException; use Symfony\Component\EventDispatcher\EventSubscriberInterface; /** * This class is a small collection of common/default credential checkers. + * + * @service authx.credentials */ -class CheckCredential implements EventSubscriberInterface { +class CheckCredential extends AutoService implements EventSubscriberInterface { /** * Listener priority for handling credential format of 'Basic' with diff --git a/ext/authx/authx.php b/ext/authx/authx.php index c3ebc11746..432afe1d89 100644 --- a/ext/authx/authx.php +++ b/ext/authx/authx.php @@ -5,13 +5,6 @@ require_once 'authx.civix.php'; use CRM_Authx_ExtensionUtil as E; // phpcs:enable - -function authx_civicrm_container(\Symfony\Component\DependencyInjection\ContainerBuilder $container) { - $container->register('authx_credentials', '\Civi\Authx\CheckCredential') - ->addTag('kernel.event_subscriber') - ->setPublic(TRUE); -} - /** * Perform a system login. * -- 2.25.1