You are here

public function LingotekOAuthRequestVerifier::verifyIfSigned in Lingotek Translation 7.7

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

* Verify the request if it seemed to be signed. * *

Parameters

string token_type the kind of token needed, defaults to 'access': * @exception OAuthException2 thrown when the request did not verify * @return boolean true when signed, false when not signed

File

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

Class

LingotekOAuthRequestVerifier

Code

public function verifyIfSigned($token_type = 'access') {
  if ($this
    ->getParam('oauth_consumer_key')) {
    LingotekOAuthRequestLogger::start($this);
    $this
      ->verify($token_type);
    $signed = true;
    LingotekOAuthRequestLogger::flush();
  }
  else {
    $signed = false;
  }
  return $signed;
}