You are here

public static function LiveWeather::buildAuthorizationHeader in Live Weather 8.2

buildAuthorizationHeader.

Overrides LiveWeatherInterface::buildAuthorizationHeader

1 call to LiveWeather::buildAuthorizationHeader()
LiveWeather::locationCheck in src/LiveWeather.php
Get location data.

File

src/LiveWeather.php, line 196
Contains \Drupal\live_weather\LiveWeather.

Class

LiveWeather
Live weather.

Namespace

Drupal\live_weather

Code

public static function buildAuthorizationHeader($oauth) {
  $r = 'Authorization: OAuth ';
  $values = array();
  foreach ($oauth as $key => $value) {
    $values[] = "{$key}=\"" . rawurlencode($value) . "\"";
  }
  $r .= implode(', ', $values);
  return $r;
}