Skip to content

Commit ff681d9

Browse files
authored
Merge pull request #7 from crowdsourcedtesting/auth-return-full-token
[oAuth2] Return full token information
2 parents 1516348 + a89ef59 commit ff681d9

6 files changed

Lines changed: 44 additions & 42 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
/vendor
22
composer.lock
33
composer.phar
4-
phpunit.xml
4+
phpunit.xml

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ install:
1717
- travis_retry composer install --no-interaction --prefer-dist
1818

1919
script:
20-
- vendor/bin/phpunit
20+
- vendor/bin/phpunit

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ to your `composer.json` file:
2020
```json
2121
{
2222
"require": {
23-
"cst/leantesting": "~1.0"
23+
"cst/leantesting": "2.*"
2424
}
2525
}
2626
```

composer.json

Lines changed: 37 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,40 @@
11
{
2-
"name": "cst/leantesting",
3-
"description": "Lean Testing PHP SDK",
4-
"keywords": [
5-
"testing",
6-
"bug tracker",
7-
"api"
8-
],
9-
"homepage": "https://leantesting.com/",
10-
"license": "MIT",
11-
"authors": [
12-
{
13-
"name": "Marcel Bontaș",
14-
"email": "marcel.bontas@yandex.ru",
15-
"role": "Developer"
2+
"name" : "cst/leantesting",
3+
"description": "Lean Testing PHP SDK",
4+
"keywords" : [
5+
"testing",
6+
"bug tracker",
7+
"api"
8+
],
9+
"homepage": "https://leantesting.com/",
10+
"license" : "MIT",
11+
"authors" : [
12+
{
13+
"name" : "Marcel Bontaș",
14+
"email": "marcel.bontas@yandex.ru",
15+
"role" : "Developer"
16+
}, {
17+
"name" : "Carlos Yakimov",
18+
"email": "carlos@crowdsourcedtesting.com",
19+
"role" : "Developer"
20+
}
21+
],
22+
"require": {
23+
"php": ">=5.4"
1624
},
17-
{
18-
"name": "Carlos Yakimov",
19-
"email": "carlos@crowdsourcedtesting.com",
20-
"role": "Developer"
21-
}
22-
],
23-
"require": {
24-
"php": ">=5.4"
25-
},
26-
"require-dev": {
27-
"phpunit/phpunit": "~4.0",
28-
"mockery/mockery": "~0.9",
29-
"squizlabs/php_codesniffer": "2.*"
30-
},
31-
"autoload": {
32-
"psr-4": {
33-
"LeanTesting\\API\\Client\\": "src"
34-
}
35-
},
36-
"autoload-dev": {
37-
"psr-4": {
38-
"LeanTesting\\API\\Client\\Test\\": "tests"
25+
"require-dev": {
26+
"phpunit/phpunit" : "~4.0",
27+
"mockery/mockery" : "~0.9",
28+
"squizlabs/php_codesniffer": "2.*"
29+
},
30+
"autoload": {
31+
"psr-4": {
32+
"LeanTesting\\API\\Client\\": "src"
33+
}
34+
},
35+
"autoload-dev": {
36+
"psr-4": {
37+
"LeanTesting\\API\\Client\\Test\\": "tests"
38+
}
3939
}
40-
}
41-
}
40+
}

src/Client.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
namespace LeanTesting\API\Client;
34

45
use LeanTesting\API\Client\Exception\SDKInvalidArgException;
@@ -78,4 +79,5 @@ public function attachToken($access_token)
7879

7980
$this->access_token = $access_token;
8081
}
82+
8183
}

src/Handler/Auth/OAuth2Handler.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ public function exchangeAuthCode($client_id, $client_secret, $grant_type, $code,
122122
);
123123

124124
$resp = $req->exec();
125-
return $resp['access_token'];
125+
return $resp;
126126
}
127+
127128
}

0 commit comments

Comments
 (0)