You are here

public function OAuthRequestVerifier::verifyIfSigned in Lingotek Translation 7.2

Same name and namespace in other branches
  1. 7.3 lib/oauth-php/library/OAuthRequestVerifier.php \OAuthRequestVerifier::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/OAuthRequestVerifier.php, line 106

Class

OAuthRequestVerifier

Code

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