You are here

public static function LingotekOAuthRequestVerifier::requestIsSigned in Lingotek Translation 7.4

Same name and namespace in other branches
  1. 7.7 lib/oauth-php/library/LingotekOAuthRequestVerifier.php \LingotekOAuthRequestVerifier::requestIsSigned()
  2. 7.5 lib/oauth-php/library/LingotekOAuthRequestVerifier.php \LingotekOAuthRequestVerifier::requestIsSigned()
  3. 7.6 lib/oauth-php/library/LingotekOAuthRequestVerifier.php \LingotekOAuthRequestVerifier::requestIsSigned()

* See if the current request is signed with OAuth * *

Return value

boolean

File

lib/oauth-php/library/LingotekOAuthRequestVerifier.php, line 77

Class

LingotekOAuthRequestVerifier

Code

public static function requestIsSigned() {
  if (isset($_REQUEST['oauth_signature'])) {
    $signed = true;
  }
  else {
    $hs = LingotekOAuthRequestLogger::getAllHeaders();
    if (isset($hs['Authorization']) && strpos($hs['Authorization'], 'oauth_signature') !== false) {
      $signed = true;
    }
    else {
      $signed = false;
    }
  }
  return $signed;
}