/** * Constructor, completes configuration for basic authentication. * * @param ComponentCollection $collection The Component collection used on this request. * @param array $settings An array of settings. */ public function __construct(ComponentCollection $collection, $settings) { parent::__construct($collection, $settings); if (empty($this->settings['realm'])) { $this->settings['realm'] = env('SERVER_NAME'); } }
/** * Constructor * * @param ComponentCollection $collection The Component collection used on this request. * @param array $settings Array of settings to use. * @throws CakeException */ public function __construct(ComponentCollection $collection, $settings) { parent::__construct($collection, $settings); if (empty($this->settings['parameter']) && empty($this->settings['header'])) { throw new CakeException(__d('bz_utils', 'You need to specify token parameter and/or header')); } }
/** * Constructor * * @param ComponentCollection $collection The Component collection used on this request. * @param array $settings Array of settings to use. * * @throws CakeException */ public function __construct(ComponentCollection $collection, $settings) { $this->currentDateTime = new DateTime(); parent::__construct($collection, $settings); if (empty($this->settings['parameter']) && empty($this->settings['header'])) { throw new CakeException(__d('jwt_auth', 'You need to specify token parameter and/or header')); } }
public function __construct(ComponentCollection $collection, $settings) { $this->settings['host'] = 'cas.ucdavis.edu'; $this->settings['context'] = '/cas'; $this->settings['port'] = 443; $this->settings['ca_cert_path'] = '/usr/share/ca-certificates/mozilla/AddTrust_External_Root.crt'; phpCAS::client(CAS_VERSION_2_0, $this->settings['host'], $this->settings['port'], $this->settings['context']); phpCAS::setCasServerCACert($this->settings['ca_cert_path']); parent::__construct($collection, $settings); }
/** * Find a user record using the standard options. * * The $conditions parameter can be a (string)username or an array containing conditions for Model::find('first'). * * @param array $conditions An array of find conditions. * @return Mixed Either false on failure, or an array of user data. */ protected function _findUser($conditions, $password = null) { $userModel = $this->settings['userModel']; list($plugin, $model) = pluginSplit($userModel); $fields = $this->settings['fields']; $user = parent::_findUser($conditions); if (isset($user[$fields['password']])) { unset($user[$fields['password']]); } return $user; }
/** * Constructor, completes configuration for digest authentication. * * @param ComponentCollection $collection The Component collection used on this request. * @param array $settings An array of settings. */ public function __construct(ComponentCollection $collection, $settings) { parent::__construct($collection, $settings); if (empty($this->settings['realm'])) { $this->settings['realm'] = env('SERVER_NAME'); } if (empty($this->settings['nonce'])) { $this->settings['nonce'] = uniqid(''); } if (empty($this->settings['opaque'])) { $this->settings['opaque'] = md5($this->settings['realm']); } }
public function __construct(ComponentCollection $collection, $settings) { parent::__construct($collection, $settings); }
public function __construct(ComponentCollection $collection, $settings) { $this->settings['cookie'] = array('name' => 'RememberMe', 'time' => '+2 weeks', 'base' => Router::getRequest()->base); $this->settings['crypt'] = 'rijndael'; parent::__construct($collection, $settings); }
function logout($user) { $this->initializeCASClient(); // Force CAS logout if required if (phpCAS::isAuthenticated()) { phpCAS::logout(); } return parent::logout(); }
/** * Constructor * * @param ComponentCollection $collection Components collection. * @param array $settings Settings */ public function __construct(ComponentCollection $collection, $settings) { $this->settings['crypt'] = 'rijndael'; parent::__construct($collection, $settings); }
/** * Sets the loaded::$user property from the authenticate object if not already set. * * Calls the ::$authenticate object's ::getUser() method to fetch the * User using the available Request information. * * @return bool True if a user can be found, false if one cannot. */ protected function getUser() { $user = $this->user(); if ($user) { return true; } $result = $this->authenticateObject->getUser($this->request); if (!empty($result) && is_array($result)) { $this->user = $result; return true; } return false; }
/** * Constructor */ public function __construct(ComponentCollection $collection, $settings) { $this->settings['cookie'] = array('name' => 'CAL', 'time' => '+2 weeks'); $this->settings['crypt'] = 'rijndael'; parent::__construct($collection, $settings); }
/** * Constructor. prepares defaultSettings * Settings: * userModel: model to use callback * callback: string, model method or its behavior method name * * @param ComponentCollection $collection * @param array $settings */ public function __construct(ComponentCollection $collection, $settings = array()) { $this->settings = Set::merge($this->settings, self::$defaultSettings); parent::__construct($collection, $settings); }