Get a Logout URL suitable for use with redirects.

The parameters:
- next: the url to go to after a successful logout

@param Array $params provide custom parameters
@return String the URL for the logout flow
163082
public function getLogoutUrl($params=array()) {
    return $this->getUrl(
      'www',
      'logout.php',
      array_merge(array(
        'next'         => $this->getCurrentUrl(),
        'access_token' => $this->getAccessToken(),
      ), $params)
    );
  }
673681
public function getFollowed($params = [])
  {
      $this->wrapper->checkScope('user_read');

      $defaults = [
          'limit'       => 25,
          'offset'      => 0,
          'stream_type' => 'all',
      ];

      $values = [
          'stream_type' => ['all', 'playlist', 'live'],
      ];

      return $this->wrapper->request('GET', 'streams/followed', ['query' => $this->resolveOptions($params, $defaults, [], $values)], true);
  }
826399
public function getSignature(array $params)
    {
        ksort($params);
        $signature = md5($this->parameters->getAuth('secret') . json_encode($params));

        return $signature;
    }
725715
def get_logout_url(service):
    """"""
    for backend in _get_backends():
        try:
            return backend.get_logout_url(service)
        except AttributeError:
            raise NotImplementedError("%s.%s.get_logout_url() not implemented" % (
                backend.__class__.__module__, backend.__class__.__name__)
            )
    return None
743753
public function getAbsolutePath($params = array())
	{
		$routes = $this->getFullRoutes();

		$paths = array();

		foreach($routes as $route)
		{
			$path = $route->getParameterizedPath($params);
			
			if($path)
				$paths[] = $path; 
		}

		return trim(implode('/', $paths), '/');
	}
1190435
public static function logout($params = "")
    {
        phpCAS :: traceBegin();
        phpCAS::_validateClientExists();

        $parsedParams = array ();
        if ($params != "") {
            if (is_string($params)) {
                phpCAS :: error('method `phpCAS::logout($url)\' is now deprecated, use `phpCAS::logoutWithUrl($url)\' instead');
            }
            if (!is_array($params)) {
                phpCAS :: error('type mismatched for parameter $params (should be `array\')');
            }
            foreach ($params as $key => $value) {
                if ($key != "service" && $key != "url") {
                    phpCAS :: error('only `url\' and `service\' parameters are allowed for method `phpCAS::logout($params)\'');
                }
                $parsedParams[$key] = $value;
            }
        }
        self::$_PHPCAS_CLIENT->logout($parsedParams);
        // never reached
        phpCAS :: traceEnd();
    }
603021
protected function getAccessTokenRequest(array $params)
    {
        $method  = $this->getAccessTokenMethod();
        $url     = $this->getAccessTokenUrl($params);
        $options = $this->optionProvider->getAccessTokenOptions($this->getAccessTokenMethod(), $params);

        return $this->getRequest($method, $url, $options);
    }
623579
protected function getRedirectUrl(array $responseHeaders)
    {
        // Check for the redirect after authentication
        foreach ($responseHeaders as $header) {
            if ( preg_match('/^(Location:|URI:)\s*([^\s]+.*)$/', $header, $matches)
            ) {
                return trim(array_pop($matches));
            }
        }
        return null;
    }
36544
public function getResult(...$params): string
    {
        $response = $this->getResponse(...$params);
        return $response->getBody()->getContents();
    }
979913
protected function getQueryParams(array $params = []): string
    {
        if (empty($params)) {
            return '';
        }
        $query = $params['query'] ?? [];
        if (is_string($query)) {
            return $query;
        }
        return empty($query) ? '' : http_build_query($query);
    }
642995
protected function redirect($url,$param=[])
    {
        if(Request::isAjax()){
            return $this->json(1,'跳转',['url'=>url($url,$param)]);
        }
        if(substr($url,0,3)==='ef:'){
            $url=substr($url,3);
            echo '<script type="text/javascript">top.location.href="'.url($url,$param).'";</script>';
        }else{
            header('Location:'.url($url,$param));
        }
        exit;
    }
451258
public function getUrl(string $path = null, array $params = []): Uri
    {
        $pathParams = $this->getPathParams($params);
        # get the path parameters
        $queryParams = $this->getQueryParams($params);
        # get the query parameters
        $path .= !empty($pathParams) ? '/' . $pathParams : '';
        # append the rest of the path
        if (!empty($path) && $path[0] !== '/') {
            $path = '/' . $path;
        }
        return $this->uri->withPath($path)->withQuery($queryParams);
    }
617765
public function logout($options = []) {
		$options = Hash::merge($this->getConfig('logout'), $options);
		$Auth = $this->_getAuthObject();
		$user = $Auth->user();

		if (empty($user)) {
			return $this->getController()->redirect($this->getController()->referer());
		}

		$logoutRedirect = $Auth->logout();
		if (is_null($options['successRedirectUrl'])) {
			$options['successRedirectUrl'] = $logoutRedirect;
		}

		return $this->handleFlashAndRedirect('success', $options);
	}
308006
private static function getCacheKeyForCall(array $params)
    {
        static $domainLevel = null;

        $params += $_GET;
        $keyStr = '';
        foreach ($params as $param) {
            $keyStr .= serialize($param);
        }

        $keyStr .= Request::domainPrefix(
            $domainLevel ?? $domainLevel = count(explode('.', Config::application('domain')))
        );

        return md5($keyStr);
    }
1172572
protected function getAccessTokenRequest(array $params)
    {
        if (isset($params['scope']) && is_array($params['scope'])) {
            $separator = $this->getScopeSeparator();
            $params['scope'] = implode($separator, $params['scope']);
        }

        return parent::getAccessTokenRequest($params);
    }
53158
public function getUrl($params): string
    {
        // prepare params
        $params = $this->getParams($params);

        // retrieve URL
        return Router::getUrl(
            $this->getModule(),
            $this->getController(),
            $params
        );
    }
469197
public function buildAuthUrl(array $params = [])
    {
        $defaultParams = [
            'appid' => $this->clientId,
            'response_type' => 'code',
            'redirect_uri' => $this->getReturnUrl(),
        ];
        if (!empty($this->scope)) {
            $defaultParams['scope'] = $this->scope;
        }

        if ($this->validateAuthState) {
            $authState = $this->generateAuthState();
            $this->setState('authState', $authState);
            $defaultParams['state'] = $authState;
        }

        return $this->composeUrl($this->authUrl, array_merge($defaultParams, $params));
    }