Set authorization header parameters

@access public
@param  string|array $params OAuth signed parameters
@return void
351129
public function setAuthHeader($params)
    {
        if (is_array($params)) {
            $this->authHeader = $this->toHeader($params);
        } else {
            if (strpos($params, 'Authorization: ') !== false) {
                $params = str_replace('Authorization: ', '', $params);
            }

            $this->authHeader = $params;
        }
    }
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;
    }
981591
protected function setTHead(&$params)
    {
        $k = $this->getColumnIndex($params);

        if (isset($params['parent'])) {
            $this->theadChild[] = [
                'title' => $params['title'],
                'class' => isset($params['className']) ? $params['className'] : null,
                'colspan' => 1,
            ];
            $this->thead[$k]['colspan'] = !isset($this->thead[$k]['colspan']) ? 1 : ($this->thead[$k]['colspan']+1);
            $this->thead[$k]['title']   = $params['parent'];
            $this->header = true;
        } else {
            if (isset($params['title'])) {
                $this->thead[$k]['title']   = $params['title'];
            }
            if (isset($params['className'])) {
                $this->thead[$k]['class'] = $params['className'];
            }
        }
    }
347297
public function save($params = array()) {
        $badges = $params['badge_badges'];
        unset($params['badge_badges']);
        foreach ($badges as $badgeid) {
            $params["badge_{$badgeid}"] = $badgeid;
        }

        parent::save($params);
    }
713378
public function setParams(array $params)
    {
        foreach ($params as $param) {
            $this->config->setEndpoint(
                str_replace('{' . $param['placeholder'] . '}', $param['value'], $this->config->getConfig()['endpoint'])
            );
        }

        $this->parentParams = $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);
	}
580060
protected function getAccessTokenOptions(array $params)
    {
        $options = ['headers' => ['content-type' => 'application/json']];

        if (self::METHOD_POST === $this->getAccessTokenMethod()) {
            $options['body'] = json_encode($params);
        }

        return $options;
    }
929922
public function addRouteParameters(array $params)
    {
        $this->parameters = array_merge($this->parameters,$params);
        $this->rawParameters = array_merge($this->rawParameters, $params);

        $this->routeParameters = $params;
    }
480058
public function setAccessControlAllowHeaders($headers)
    {
        if (is_array($headers)) {
            $headers = implode(', ', $headers);
        }

        $this->setHeader('Access-Control-Allow-Headers', (string) $headers);

        return $this;
    }
888304
protected function set_params( $params ) {
		$this->requirements_details_url = ! empty( $params['requirements_details_url'] ) ? esc_url( trim( (string) $params['requirements_details_url'] ) ) : $this->requirements_details_url;
		$this->version_compare_operator = ! empty( $params['version_compare_operator'] ) ? (string) $params['version_compare_operator'] : $this->version_compare_operator;
		$this->not_valid_actions        = ! empty( $params['not_valid_actions'] ) ? (array) $params['not_valid_actions'] : $this->not_valid_actions;
		$this->show_valid_results       = isset( $params['show_valid_results'] ) ? (bool) $params['show_valid_results'] : $this->show_valid_results;
	}
1368090
public function setOAuth2Token ($token)
    {
        if (!StringUtilities::isNullOrEmpty($token))
        {
            $this->oAuth2Token = $token;
            $this->headers[]   = "Authorization: OAuth " . $this->oAuth2Token;
        }
    }
814422
protected function ensureAccess($params = [])
    {
        if (!isset($this->checkAccess))
            return;

        $params['action'] = $this;

        if (call_user_func($this->checkAccess, $params))
            return;

        $user = \Yii::$app->user;

        if ($user->getIsGuest())
            $user->loginRequired();
        else
            throw new ForbiddenHttpException(\Yii::t(
                Constants::MSG_CATEGORY_NAME,
                'You are not allowed to perform this action.'
            ));

    }
708907
public function setParams($params)
    {
        foreach ($params as $name => $value) {
            $this->setParam($name, $value);
        }
        return $this;
    }
798571
public function setParams(array $params = array())
    {
        foreach ($params as $key => $value) {
            if (null != $value) {
                $this->$key = $value;
            }
        }

        return $this;
    }
1031283
public function setParams(array $params)
    {
        // Is this an associative array?
        if (!empty($params)) {
            if (\count(array_filter(array_keys($params), '\is_string')) < 1) {
                throw new ParseIncludesException('Parameters must be an associative array indexed by key');
            }
        }
        $this->params = $params;

        return $this;
    }
570803
function setAuthorization($username,$password){
		settype($username,"string");
		settype($password,"string");

		$this->_Username = $username;
		$this->_Password = $password;
		$this->_AuthType = "basic";
	}
809125
protected function getAccessTokenOptions(array $params)
    {
        // Add params that are required
        $params += [
            'scope' => implode($this->getScopeSeparator(), $this->getDefaultScopes()),
        ];

        $options = parent::getAccessTokenOptions($params);

        // Add authorization header
        $options['headers']['Authorization'] = sprintf(
            'Basic %s',
            base64_encode(
                sprintf(
                    '%s:%s',
                    $this->clientId,
                    $this->lif
                )
            )
        );

        return $options;
    }