diff --git a/composer.json b/composer.json index e2cca91..5628aa0 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,8 @@ "description": "A Bitbucket api interface", "type": "library", "require": { - "php": "^7.2" + "php": "^7.2", + "ext-curl": "*" }, "require-dev": { }, diff --git a/src/Client/BitbucketApi.php b/src/Client/BitbucketApi.php index 4e352d3..6e5eaad 100644 --- a/src/Client/BitbucketApi.php +++ b/src/Client/BitbucketApi.php @@ -194,4 +194,31 @@ protected function sendCurl($url, $curlOpts = [], $headers = []) throw new BitbucketApiReturnUnknownException($response['http_status_code']); } } + + /** + * Returns current Barer token. + * @return string|null + */ + public function getToken() + { + return $this->token; + } + + /** + * Returns current refresh token. + * @return string|null + */ + public function getRefresh() + { + return $this->refresh; + } + + /** + * Returns token expire time in seconds from time when token was initialised. + * @return int|null + */ + public function getExpiresIn() + { + return $this->expiresIn; + } } \ No newline at end of file