⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.78
Server IP:
41.128.143.86
Server:
Linux host.raqmix.cloud 6.8.0-1025-azure #30~22.04.1-Ubuntu SMP Wed Mar 12 15:28:20 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.3.23
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
psa-pear
/
pear
/
php
/
Horde
/
Core
/
Factory
/
View File Name :
ImspAuth.php
* @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 */ /** * A Horde_Injector:: based Horde_Imsp_Auth:: factory. * * Copyright 2011-2017 Horde LLC (http://www.horde.org/) * * See the enclosed file COPYING for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. * * @category Horde * @package Core * @author Michael J Rubinsky
* @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 */ class Horde_Core_Factory_ImspAuth { /** * Instance cache * * @var array */ protected static $_instances = array(); /** * * @var Horde_Injector */ protected $_injector; /** * Constructor * * @param Horde_Injector $injector */ public function __construct(Horde_Injector $injector) { $this->_injector = $injector; } /** * Attempts to return a concrete Horde_Imsp_Auth instance based on $driver. * Will only create a new object if one with the same parameters already * does not exist. * * @param string $driver Type of IMSP_Auth subclass to return. * @param array $params The driver parameters. * * @return Horde_Imsp_Auth */ public static function create($driver, array $params = array()) { //@TODO: Fix this. /* Check for any imtest driver instances and kill them. Otherwise, the socket will hang between requests from seperate drivers (an Auth request and an Options request).*/ if (is_array(self::$_instances)) { foreach (self::$_instances as $obj) { if ($obj->getDriverType() == 'imtest') { $obj->logout(); } } } $signature = serialize(array($driver, $params)); if (!isset(self::$_instances[$signature])) { self::$_instances[$signature] = self::_factory($driver, $params); } return self::$_instances[$signature]; } /** * Attempts to return a concrete Horde_Imsp_Auth instance based on $driver * Must be called as &Horde_Imsp_Auth::factory() * * @param string $driver Type of Horde_Imsp_Auth subclass to return. * * @return mixed The created Horde_Imsp_Auth subclass. * @throws Horde_Exception */ protected static function _factory($driver, array $params = array()) { $driver = basename($driver); $class = 'Horde_Imsp_Auth_' . $driver; // Verify user/pass if (empty($params['username'])) { $params['username'] = $GLOBALS['registry']->getAuth('bare'); $params['password'] = $GLOBALS['registry']->getAuthCredential('password'); } return new $class($params); } }