Skip to content

Commit

Permalink
adding support for tokenSkewProtectionCount attribute in Api. Added i…
Browse files Browse the repository at this point in the history
…n ApiAxle 1.12.17
  • Loading branch information
fillup committed Apr 17, 2014
1 parent 9d5acd9 commit 38fdc2c
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/ApiAxle/Api/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,16 @@ class Api
*/
protected $strictSSL = 'true';

/**
* (default: 3) Allows configuration of window size for valid signatures.
* When using signed requests, ApiAxle will calculate valid signature for
* this many seconds before and after now. So when set to 3, there are 7
* possible signatures that are valid.
*
* @var integer
*/
protected $tokenSkewProtectionCount = 3;

/**
* Construct new Api object.
*
Expand Down Expand Up @@ -167,6 +177,7 @@ public function setData($data)
$this->defaultPath = isset($data->defaultPath) ? $data->defaultPath : null;
$this->disabled = isset($data->disabled) ? $data->disabled : false;
$this->strictSSL = isset($data->strictSSL) ? $data->strictSSL : true;
$this->tokenSkewProtectionCount = isset($data->tokenSkewProtectionCount) ? $data->tokenSkewProtectionCount : $this->tokenSkewProtectionCount;

return $this;
}
Expand All @@ -190,7 +201,8 @@ public function getData()
'extractKeyRegex' => $this->extractKeyRegex,
'defaultPath' => $this->defaultPath,
'disabled' => $this->disabled,
'strictSSL' => $this->strictSSL
'strictSSL' => $this->strictSSL,
'tokenSkewProtectionCount' => $this->tokenSkewProtectionCount,
);

return $data;
Expand Down

0 comments on commit 38fdc2c

Please sign in to comment.