| 1 | <?php |
||
| 14 | class OAuth |
||
| 15 | { |
||
| 16 | /* |
||
| 17 | * token life time in second |
||
| 18 | * */ |
||
| 19 | public $tokenLifeTime; |
||
| 20 | public $key; |
||
| 21 | public $iss; |
||
| 22 | |||
| 23 | protected $expireTimestamp; |
||
| 24 | protected $accessToken; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * OAuth constructor. |
||
| 28 | * @param $key |
||
| 29 | * @param $iss |
||
| 30 | */ |
||
| 31 | public function __construct($key, $iss, $tokenLifeTime = 3600) |
||
| 37 | |||
| 38 | protected function requestAccessToken() |
||
| 62 | |||
| 63 | public function getAccessToken() |
||
| 71 | } |