Merge pull request #23710 from eileenmcnaughton/civi_import
[civicrm-core.git] / Civi / Pipe / PublicMethods.php
index 3cb7e8d592338474b9295fd574e6c2ec4fde072d..06b17406b6942180497c02de08a7fcf49fec5353 100644 (file)
@@ -104,7 +104,7 @@ class PublicMethods {
    */
   public function login(PipeSession $session, array $request) {
     if (!function_exists('authx_login')) {
-      throw new \CRM_Core_Exception("Cannot authenticate. Authx is not configured.");
+      throw new \CRM_Core_Exception('Cannot authenticate. Authx is not configured.');
     }
 
     $redact = function(?array $authx) {
@@ -116,17 +116,17 @@ class PublicMethods {
       return $redact(authx_login(['flow' => 'script', 'principal' => $principal]));
     }
     elseif ($principal && !$session->isTrusted()) {
-      throw new AuthxException("Session is not trusted.");
+      throw new AuthxException('Session is not trusted.');
     }
     elseif (isset($request['cred'])) {
       $authn = new \Civi\Authx\Authenticator();
       $authn->setRejectMode('exception');
       if ($authn->auth(NULL, ['flow' => 'pipe', 'cred' => $request['cred']])) {
-        return $redact(\CRM_Core_Session::singleton()->get("authx"));
+        return $redact(\CRM_Core_Session::singleton()->get('authx'));
       }
     }
 
-    throw new AuthxException("Cannot authenticate. Must specify principal/credentials.");
+    throw new AuthxException('Cannot authenticate. Must specify principal/credentials.');
   }
 
   /**