Skip to content
Permalink
Browse files

improved revocation of consumer keys; updates #387

  • Loading branch information...
following5 committed Mar 17, 2016
1 parent 1540b35 commit cf97cb2fb47da54bc9b588f57d3b47822bb45e3c
Showing with 7 additions and 7 deletions.
  1. +7 −7 okapi/core.php
@@ -2279,20 +2279,20 @@ public function __construct($options)
if (!$this->consumer) {
throw new InvalidParam('consumer_key', "Consumer does not exist.");
}
if ($this->consumer->hasFlag(OkapiConsumer::FLAG_KEY_REVOKED)) {
throw new BadRequest("Your application was denied access to the " .
Okapi::get_normalized_site_name() . " site " .
"(OKAPI consumer key was revoked).");
}
}
if (($this->opt_min_auth_level == 1) && (!$this->consumer))
throw new BadRequest("This method requires the 'consumer_key' argument (Level 1 ".
"Authentication). You didn't provide one.");
}
}
if (is_object($this->consumer) && $this->consumer->hasFlag(OkapiConsumer::FLAG_SKIP_LIMITS))
{
if (is_object($this->consumer) && $this->consumer->hasFlag(OkapiConsumer::FLAG_KEY_REVOKED)) {
throw new BadRequest("Your application was denied access to the " .
Okapi::get_normalized_site_name() . " site " .
"(OKAPI consumer key was revoked).");
}
if (is_object($this->consumer) && $this->consumer->hasFlag(OkapiConsumer::FLAG_SKIP_LIMITS)) {
$this->skip_limits = true;
}

0 comments on commit cf97cb2

Please sign in to comment.
You can’t perform that action at this time.