Example #1
0
 public function __construct($path = '')
 {
     parent::__construct($path);
     if ($path[1] == 'ajax') {
         //任意控制器的动作为ajax时, 执行ajax动作, 禁止输出页头, 页尾及数据库访问错误
         APP::$DB->printerror = false;
         //ajax数据库访问不打印错误信息
         $this->ajax['s'] = 1;
         //初始化ajax返回数据, s表示状态
         $this->ajax['i'] = '';
         //i指ajax提示信息
         $this->ajax['d'] = '';
         //d指ajax返回的数据
         $this->json = new JSON();
         if (!$this->admin) {
             //管理员验证不成功, 直接输出ajax信息, 并终止ajax其它程序程序运行
             $this->ajax['i'] = "管理员授权错误! 请确认已成功登录后台.";
             die($this->json->encode($this->ajax));
         }
     } else {
         if ($path[1] == 'logout') {
             $this->logout();
         }
         //无论哪个控制器, 只要是logout动作, admin用户退出
         if ($path[0] == 'online') {
             $this->s_page_header($path);
             //授权成功, 客服输出页头
         } else {
             $this->page_header($path);
             //授权成功, 管理员输出页头
         }
     }
 }
Example #2
0
	/**
	 * Constructor loads the user list into the class.
	 */
	public function __construct($config = array())
	{
		parent::__construct($config);

		// Load user list
		$this->_users = Arr::get($config, 'users', array());
	}
Example #3
0
 public function __construct($options = array())
 {
     parent::__construct($options);
     if (empty(self::$_specialities)) {
         $m = $this->mongod();
         self::$_specialities = $m->get('specialities');
     }
 }
Example #4
0
File: Jam.php Project: Konro1/pms
 public function __construct($config = array())
 {
     parent::__construct($config);
     foreach ($config['services'] as $service => $config) {
         $class = 'Auth_Service_' . Jam::capitalize_class_name($service);
         $this->_services[$service] = new $class($config);
     }
 }
Example #5
0
 /**
  * Constructor
  * 
  * @param object Auth_ContainerBase
  * @param array	further options Not used in the moment
  */
 public function __construct($container, $a_options = array())
 {
     $_POST['username'] = 'dummy';
     $_POST['password'] = 'dummy';
     parent::__construct($container, $a_options, '', false);
     $this->setSessionName("_authhttp" . md5(CLIENT_ID));
     $this->initAuth();
 }
Example #6
0
 /**
  * Constructor
  * 
  * @param object $container
  * @param array	further options Not used in the moment
  */
 public function __construct($a_container, $a_further_options = array())
 {
     global $PHPCAS_CLIENT;
     parent::__construct($a_container, $a_further_options, array($a_container, 'forceAuthentication'), true);
     $this->setSessionName("_authhttp" . md5(CLIENT_ID));
     $this->initAuth();
     if (is_object($PHPCAS_CLIENT) and $PHPCAS_CLIENT->isAuthenticated()) {
         $this->username = $PHPCAS_CLIENT->getUser();
     }
 }
Example #7
0
 public function __construct($opts = [])
 {
     parent::__construct($opts);
     $start = RequestMethods::get('start', date('Y-m-d', strtotime("-1 day")));
     $end = RequestMethods::get('end', date('Y-m-d'));
     $user_id = RequestMethods::get("user_id", null);
     $this->start = $start;
     $this->end = $end;
     $this->user_id = $user_id;
 }
Example #8
0
 /**
  * Contructor
  * @return 
  * @param object $a_container
  * @param object $a_addition_options[optional]
  */
 public function __construct($a_container, $a_addition_options = array())
 {
     parent::__construct($a_container, $a_addition_options, array($this, 'callProvider'), true);
     $this->setSessionName("_authhttp" . md5(CLIENT_ID));
     $this->initAuth();
     $this->initSettings();
     if (isset($_GET['oid_check_status'])) {
         $_POST['username'] = 'dummy';
         $_POST['password'] = 'dummy';
     }
 }
Example #9
0
 public function __construct($userman, $freepbx)
 {
     parent::__construct($userman, $freepbx);
     $this->FreePBX = $freepbx;
     $config = $userman->getConfig("authMSADSettings");
     $this->host = $config['host'];
     $this->port = !empty($config['port']) ? $config['port'] : 389;
     $this->dn = $config['dn'];
     $this->domain = $config['domain'];
     $this->user = $config['username'];
     $this->password = $config['password'];
     $this->linkAttr = isset($config['la']) ? $config['la'] : '';
 }
Example #10
0
 function __construct()
 {
     parent::__construct();
     define('AMQP_DEBUG', false);
     //define('MQ_HOST', '115.29.188.246');
     //        define('MQ_PORT', 5672);
     //        define('MQ_USER', 'valsun_tran');
     //        define('MQ_PASS', 'tranabc');
     //        define('MQ_VHOST', 'valsun_tran');
     define('MQ_HOST', '192.168.200.198');
     define('MQ_PORT', 5672);
     define('MQ_USER', 'xiaojinhua');
     define('MQ_PASS', 'jinhua');
     define('MQ_VHOST', 'mq_vhost1');
 }
Example #11
0
 /**
  * Constructor
  * 
  * @param string $username The username for authentication
  * @param string $password The password
  * @param boolean $autologin If the authentication is by autologin
  * @param string $token The token string
  */
 public function __construct($username, $password, $autologin, $token = "")
 {
     $config = \Centreon\Internal\Di::getDefault()->get('config');
     if (1 === $config->get('default', 'sso_enable', 0)) {
         if ('' !== $config->get('default', 'sso_header_username', '')) {
             $this->sso_username = $_SERVER[$config->get('default', 'sso_header_username', '')];
             $this->enable = true;
             if ($this->checkSsoClient()) {
                 $self->sso_mandatory = 1;
                 $username = $this->sso_username;
             }
         }
     }
     parent::__construct($username, $password, $autologin, $token);
 }
Example #12
0
 /**
  * This constructor initializes the class using the specified config information.
  *
  * @access public
  * @param mixed $config                     the config information to be used
  * @throws Throwable_Exception              indicates that error occurred when loading
  *                                          a configuration
  */
 public function __construct($config = NULL)
 {
     parent::__construct($config);
     if (isset($config['models'])) {
         if (isset($config['models']['role'])) {
             $this->models['role'] = $config['models']['role'];
         }
         if (isset($config['models']['user'])) {
             $this->models['user'] = $config['models']['user'];
         }
         if (isset($config['models']['token'])) {
             $this->models['token'] = $config['models']['token'];
         }
     }
     if (isset($config['columns'])) {
         if (isset($config['columns']['role_id'])) {
             $this->columns['role_id'] = $config['columns']['role_id'];
         }
         if (isset($config['columns']['role_name'])) {
             $this->columns['role_name'] = $config['columns']['role_name'];
         }
         if (isset($config['columns']['token'])) {
             $this->columns['token'] = $config['columns']['token'];
         }
         if (isset($config['columns']['user_id'])) {
             $this->columns['user_id'] = $config['columns']['user_id'];
         }
         if (isset($config['columns']['user_username'])) {
             $this->columns['user_username'] = $config['columns']['user_username'];
         }
         if (isset($config['columns']['user_email'])) {
             $this->columns['user_email'] = $config['columns']['user_email'];
         }
     }
     if (empty($config['login_with_email']) and empty($config['login_with_username'])) {
         throw new Throwable_Exception('Message: Unable to load configuration. Reason: A valid "login_with" setting must be set in you auth config file.');
     }
 }
Example #13
0
 public function __construct($container, $a_options = array())
 {
     parent::__construct($container, $a_options, '', false);
     $this->setSessionName("_authhttp" . md5(CLIENT_ID));
     $this->initAuth();
     /*
         	parent::__construct($container);
     
     if(isset($a_further_options['username']))
     {
     	$_POST['username'] = $a_further_options['username'];
     }
     if(isset($a_further_options['password']))
     {
     	$_POST['password'] = $a_further_options['password'];
     }
     
     $this->appendOption('sessionName',"_authhttp".md5(CLIENT_ID));
     $this->appendOption('sessionSharing',false);
     $this->initAuth();
     $this->initCallbacks();
     */
 }
Example #14
0
 /**
  * Contructor
  * @return 
  * @param object $a_container
  * @param object $a_addition_options[optional]
  */
 public function __construct($a_container, $a_addition_options = array())
 {
     global $lng;
     parent::__construct($a_container, $a_addition_options, '', false);
     $this->setSessionName("_authhttp" . md5(CLIENT_ID));
     $this->apache_settings = new ilSetting('apache_auth');
     if (defined('IL_CERT_SSO') && IL_CERT_SSO) {
         // DO NOT DELETE!!!
         // faking post values is REQUIRED to avoid canceling of the
         // startup routines
         // $_POST['username'] = 'xxx';
         $_POST['password'] = 'yyy';
         $_POST['sendLogin'] = '1';
         $_POST['auth_mode'] = AUTH_APACHE;
         $_POST['cmd[butSubmit]'] = 'Submit';
         if ($_POST['username'] != 'anonymous') {
             switch ($this->apache_settings->get('apache_auth_username_config_type')) {
                 case APACHE_AUTH_TYPE_DIRECT_MAPPING:
                     $_POST['username'] = $_SERVER[$this->apache_settings->get('apache_auth_username_direct_mapping_fieldname')];
                     break;
                 case APACHE_AUTH_TYPE_EXTENDED_MAPPING:
                     throw new ilException("APACHE_AUTH_TYPE_EXTENDED_MAPPING not yet implemented");
                 case APACHE_AUTH_TYPE_BY_FUNCTION:
                     include_once 'Services/AuthApache/classes/custom_username_func.php';
                     $_POST['username'] = ApacheCustom::getUsername();
                     break;
             }
         }
     }
     if (defined('IL_CERT_SSO') && IL_CERT_SSO && !$_POST['username']) {
         $_POST['username'] = '§invalid';
         $_POST['password'] = 'anonymous';
         $_SESSION['username_invalid'] = true;
     }
     $this->initAuth();
 }
Example #15
0
 function __construct($dbInfo)
 {
     parent::__construct();
     $this->db = new DbExternalTokenAuth($dbInfo);
 }
Example #16
0
 function __construct()
 {
     parent::__construct();
 }
Example #17
0
 /**
  * Constructor
  *
  * @access public
  * @param
  * @return
  */
 public function __construct()
 {
     parent::__construct(new Auth_Container());
 }
Example #18
0
 public function __construct($userman, $freepbx)
 {
     parent::__construct($userman, $freepbx);
     $config = $userman->getConfig("authFREEPBXSettings");
 }
Example #19
0
 /**
  * Constructor loads the user list into the class.
  */
 public function __construct(array $config)
 {
     parent::__construct($config);
     // Load user list
     $this->users = empty($config['users']) ? array() : $config['users'];
 }
 public function __construct($config)
 {
     parent::__construct($config);
 }
Example #21
0
 /**
  * Constructor loads the user list into the class.
  */
 public function __construct($config = array())
 {
     parent::__construct($config);
 }
Example #22
0
 public function __constructor()
 {
     parent::__construct();
 }
Example #23
0
 /**
  * Constructor
  *
  * Set up the storage driver.
  *
  * @param mixed     database dsn
  * @return void
  */
 function __construct($dsn, $options = array(), $application = null, $logger = null)
 {
     $defOpt = array('settings_table' => 'auth.settings', 'applications_table' => 'auth.applications', 'users_groups_table' => 'auth.users_groups', 'users_table' => 'auth.users', 'domains_table' => 'auth.domains', 'groups_table' => 'auth.groups', 'groups_acl_table' => 'auth.groups_acl', 'users_acl_table' => 'auth.users_acl', 'users_ip_table' => 'auth.users_ip', 'domains_applications_table' => 'auth.domains_applications', 'log_table' => 'auth.logs', 'domains_name_table' => 'auth.domains_name', 'acnames_table' => 'auth.acnames', 'table' => 'auth.users', 'usernamecol' => 'us_login', 'passwordcol' => 'us_password', 'cryptType' => 'md5', 'auto_quote' => false, 'db_where' => '1=1', 'enable_logging' => true, 'log_path' => null);
     $options = array_merge($defOpt, $options);
     parent::__construct('', $options, null, false);
     $this->options['dsn'] = $dsn;
     $this->options['options'] = $options;
     $this->application = $application;
     $this->options['options']['expirationTime'] = 0;
     $this->options['options']['idleTime'] = 0;
     //@TODO: tirare fuori info utente
     if ($logger !== null) {
         $this->attachLogObserver($logger);
     }
     $this->post['authsecret'] = false;
     $this->isLoggedIn = false;
     $this->skipUpdateStatus = false;
     $this->allowMultipleApplications = false;
     // if true all the hasPerm will return true
     $this->userIsSuperuser = false;
 }
Example #24
0
 /**
  * Contructor
  * @return 
  * @param object $a_container
  * @param object $a_addition_options[optional]
  */
 public function __construct($a_container, $a_addition_options = array())
 {
     parent::__construct($a_container, $a_addition_options, '', false);
     $this->setSessionName("_authhttp" . md5(CLIENT_ID));
     $this->initAuth();
 }
Example #25
0
 public function __construct($options = array())
 {
     parent::__construct($options);
     $this->willRenderLayoutView = false;
     $this->willRenderActionView = false;
 }
Example #26
0
 public function __construct($options = array())
 {
     parent::__construct($options);
     $this->noview();
 }
Example #27
0
 public function __construct($session, $id_following = null, $options = [])
 {
     parent::__construct($session, $options = []);
     /*$this->id_follower = $session->id_user;
     		$this->id_following = $id_follower;*/
 }
Example #28
0
 /**
  * Loads Session and configuration options.
  *
  * @param   array  $config  Config Options
  * @return  void
  */
 public function __construct($config = array())
 {
     parent::__construct($config);
     $this->_db_password_session_key = $this->_config['session_key'] . '_dbpass';
 }
Example #29
0
 public function __construct($userman, $freepbx)
 {
     parent::__construct($userman, $freepbx);
     $this->FreePBX = $freepbx;
     $this->userman = $userman;
 }
Example #30
0
 function __construct($dbInfo)
 {
     parent::__construct();
     $this->db = new DbSharedPasswAuth($dbInfo);
 }