Defines the list of identity providers provided by the Engage server to
sign-in widgets. This is the same list that is managed by the dashboard.

@param array $params
554678
public function setAuthProviders(array $params = array())
	{
		if (!isset($params['providers'])) {
			throw new MissingArgumentException('providers');
		}

		if (!is_array($params['providers'])) {
			throw new InvalidArgumentException('Invalid Argument: providers must be passed as array');
		}

		$params['providers'] = json_encode(array_values($params['providers']));

		return $this->post('set_auth_providers', $params);
	}
687356
protected function registerProviders()
    {
        $providers = $this->def('provider');

        if ($providers)
        {
            if (is_array($providers))
            {
                foreach ($providers as $provider)
                {
                    $this->app->register($instance = new $provider($this->app));
                }
            }
            else
            {
                $this->app->register($instence = new $providers($this->app));
            }
        }
    }
855244
private function _check_credentials($params){
    if ( $this->check() ){
      /** @var array $f The form fields sent to identify the users */
      $f =& $this->class_cfg['fields'];

      if ( !isset($params[$f['salt']]) ){
        $this->set_error(11);
      }
      else{
        if ( !$this->check_salt($params[$f['salt']]) ){
          $this->set_error(17);
        }
      }
      if ( $this->check() ){
        if ( isset($params[$f['user']], $params[$f['pass']]) ){
          // Table structure
          $arch =& $this->class_cfg['arch'];

          $this->just_login = 1;

          // Database Query
          if (
            $id = $this->db->select_one(
              $this->class_cfg['tables']['users'],
              $this->fields['id'],
              x::merge_arrays(
                $this->class_cfg['conditions'],
                [$arch['users']['active'] => 1],
                [($arch['users']['login'] ?? $arch['users']['email']) => $params[$f['user']]])
            )
          ){
            $pass = $this->db->select_one(
              $this->class_cfg['tables']['passwords'],
              $arch['passwords']['pass'],
              [$arch['passwords']['id_user'] => $id],
              [$arch['passwords']['added'] => 'DESC']);
            if ( $this->_check_password($params[$f['pass']], $pass) ){
              $this->_login($id);
            }
            else{
              $this->record_attempt();
              // Canceling authentication if num_attempts > max_attempts
              $this->set_error($this->check_attempts() ? 6 : 4);
            }
          }
          else{
            $this->set_error(6);
          }
        }
        else{
          $this->set_error(12);
        }
      }
    }
    else{

      die(var_dump($this->get_error()));
    }
    return $this->auth;
  }
1360810
public function setParameters(array $params)
	{
		foreach ($params as $paramName => $paramValue)
		{
			$this->setParameter($paramName, $paramValue);
		}
	}
202340
private static function _checkParams(array $params) : void
    {
        // check existence of mandatory parameters

        // driver
        if (! isset($params['driver']) && ! isset($params['driverClass'])) {
            throw DBALException::driverRequired();
        }

        // check validity of parameters

        // driver
        if (isset($params['driver']) && ! isset(self::$_driverMap[$params['driver']])) {
            throw DBALException::unknownDriver($params['driver'], array_keys(self::$_driverMap));
        }

        if (isset($params['driverClass']) && ! in_array(Driver::class, class_implements($params['driverClass'], true))) {
            throw DBALException::invalidDriverClass($params['driverClass']);
        }
    }
290333
private function setAuthenticationParametersNoValidation($params = null)
    {
        // Return if authentication property not set
        if ($this->auth == null) {
            return $params;
        }

        // Set parameters for previously configured auth properties
        // Get property list from auth class
        $auth_refl = new \ReflectionClass($this->auth);
        $props = $auth_refl->getProperties(\ReflectionProperty::IS_PUBLIC);

        /*
         * Loop through property names to determine if configured in auth object.
         * Add to parameters if set and does not already exist.
         */
        foreach ($props as $prop) {
            $name = $prop->getName();
            if (isset($this->auth->$name)) {
                // Do not overwrite if parameter already included
                $key = $this->auth->getAuthKeyByVar($name);
                if (!isset($params[$key])) {
                    $params[$key] = $this->auth->$name;
                }
            }
        }

        return $params;
    }
249632
private function buildAuthorizationHeader(array $params)
    {
        foreach ($params as $key => $value) {
            $params[$key] = $key . '="' . rawurlencode($value) . '"';
        }

        if (isset($this->config['realm'])) {
            array_unshift(
                $params,
                'realm="' . rawurlencode($this->config['realm']) . '"'
            );
        }

        return ['Authorization', 'OAuth ' . implode(', ', $params)];
    }
589595
public function configure(array $params): void
    {
        $dbHelperClass = DBHelper\DriverGuesser::getDBHelper($params['driver']);

        // Set specific options
        $params['driverOptions'] = $dbHelperClass::getDriverOptions();
        $this->conn = DriverManager::getConnection($params, new DbalConfiguration());
        $this->conn->setFetchMode(\Doctrine\DBAL\FetchMode::ASSOCIATIVE);

        $this->dbHelper = new $dbHelperClass($this->conn);
    }
906669
public function getOAuthProvider($params)
    {
        if (is_string($params)) {
            $params = array('provider_consumer_key' => $params);
        } else {
            $params = $this->checkFilterParams($params, array('provider_consumer_key'), array('provider_consumer_key'));
            if ($params === false) {
                throw new \InvalidArgumentException("params array contains invalid parameters or misses required parameters");
            }
        }

        return $this->lastRequest->get(null, 'oauth_providers/' . $params[ 'provider_consumer_key' ]);
    }
865212
public function setParams(array $params = [])
    {
        if (isset($params['access_token'])) {
            $this->setAccessTokenFromParams($params['access_token']);
        }

        unset($params['access_token']);

        $params = $this->sanitizeFileParams($params);
        $this->dangerouslySetParams($params);

        return $this;
    }
979851
public function registerConfiguredProviders(){
			//Count Providers Array in Config
		if (is_array($this['config']->get('plugin.providers'))) {
			foreach ($this['config']->get('plugin.providers') as $index => $namespace) {
				$this->register($namespace);
			}
		}
	}
1371738
public function initialize(array $params)
    {
        $this->params = $params;
        switch ($params['type']) {
            case self::TYPE_PROCESS:
                $this->establishProcessConnection();
                break;
            case self::TYPE_SOCKET:
            default:
                $this->establishSocketConnection();
                break;
        }
    }
236411
public function bind($params, $types)
    {
        if (empty($params)) {
            return;
        }

        $anonymousParams = is_int(key($params)) ? true : false;
        $offset = 1;
        foreach ($params as $index => $value) {
            $type = null;
            if (isset($types[$index])) {
                $type = $types[$index];
            }
            if ($anonymousParams) {
                $index += $offset;
            }
            $this->bindValue($index, $value, $type);
        }
    }
934392
protected function registerProviders(): void
    {
        foreach ($this->providers as $provider) {
            $this->app->register($provider);
        }
    }
908000
private function handleApplicationInfoInRequest($params)
	{
		// Only add if allowed
		if ($this->allowApplicationInfo) {
			// add/overwrite applicationInfo adyenLibrary even if it's already set
			$params['applicationInfo']['adyenLibrary']['name'] = $this->service->getClient()->getLibraryName();
			$params['applicationInfo']['adyenLibrary']['version'] = $this->service->getClient()->getLibraryVersion();

			if ($adyenPaymentSource = $this->service->getClient()->getConfig()->getAdyenPaymentSource()) {
				$params['applicationInfo']['adyenPaymentSource']['version'] = $adyenPaymentSource['version'];
				$params['applicationInfo']['adyenPaymentSource']['name'] = $adyenPaymentSource['name'];
			}

			if ($externalPlatform = $this->service->getClient()->getConfig()->getExternalPlatform()) {
				$params['applicationInfo']['externalPlatform']['version'] = $externalPlatform['version'];
				$params['applicationInfo']['externalPlatform']['name'] = $externalPlatform['name'];

				if (!empty($externalPlatform['integrator'])) {
					$params['applicationInfo']['externalPlatform']['integrator'] = $externalPlatform['integrator'];
				}
			}

		} else {
			// remove if exists
			if (isset($params['applicationInfo'])) {
				unset($params['applicationInfo']);
			}
		}

		return $params;
	}
1368266
protected function setFromTypes(array $params)
    {
        parent::setFromTypes($params);
        
        if ($this->reduce) {
            $this->reduce();
        }
        
        if ($this->value['den']->get() < 0) {
            //normalise the sign
            $this->value['num']->negate();
            $this->value['den']->negate();
        }
    }
520862
public function setParams($params): void
    {
        if (! \is_array($params) && ! $params instanceof \ArrayAccess) {
            throw new \InvalidArgumentException('Event params are invalid. Expected type is array or \\ArrayAccess. Got ' . \gettype($params));
        }

        $this->params = $params;
    }