Exemplo n.º 1
0
 public function build()
 {
     Preconditions::checkNotNull($this->api, "You must specify a valid api through the provider() method");
     Preconditions::checkEmptyString($this->apiKey, "You must provide an api key");
     Preconditions::checkEmptyString($this->apiSecret, "You must provide an api secret");
     return $this->api->createService(new OAuthConfig($this->apiKey, $this->apiSecret, $this->callback, $this->signatureType, $this->scope));
 }
Exemplo n.º 2
0
 private function checkPreconditions(OAuthRequest $request)
 {
     Preconditions::checkNotNull($request, "Cannot extract a header from a null object");
     $params = $request->getOauthParameters();
     if (!$params) {
         throw new OAuthParametersMissingException($request);
     }
 }
Exemplo n.º 3
0
 public function __construct($value)
 {
     Preconditions::checkNotNull($value, "Must provide a valid string as verifier");
     $this->value = $value;
 }