Alexandru Guzinschi
cb300f7b6c
[Fix] Invalid JSON in response trigger fatal error
...
If the server responded with an invalid JSON for `getAccessToken()`,
$result variable will be of type string instead of expected array.
This will result in a fatal error was being raised in AbstractProvider
when calling `prepareAccessTokenResult` method, which expects an
argument of type array.
Proposed solution is to set the variable `$result` to an empty array if
json_decode was not successful.
Doesn't make sense to throw an expection at this point, because response
will not have an access_token and an `InvalidArgumentException` will be
thrown latter when `$grant->handleResponse()` will be called.
Fix #230
2015-03-11 13:44:02 +02:00
Ben Ramsey
a012fbbf0a
Run Travis tests on PHP 7 and add linting to build
2015-03-10 16:56:02 -05:00
Ben Ramsey
76af6059fb
Merge pull request #232 from shadowhand/provider-get-headers
...
Enhance ability to use client to make authenticated requests
2015-03-10 16:23:08 -05:00
Ben Ramsey
7faec8077f
Merge branch 'geofflancaster-idpexception-empty-strings'
2015-03-10 16:03:13 -05:00
Ben Ramsey
847dbf5dfe
Fixing broken test and renamed tests for clarity
2015-03-10 16:02:39 -05:00
Ben Ramsey
248f55c201
Merge branch 'geofflancaster-patch' into geofflancaster-idpexception-empty-strings
...
Conflicts:
test/src/Exception/IDPExceptionTest.php
2015-03-10 16:01:48 -05:00
Woody Gilk
f156dd905f
update providers and tests
2015-03-10 15:50:53 -05:00
Woody Gilk
844df96de4
add ProviderInterface::getHeaders() for making authenticated requests
2015-03-10 15:50:53 -05:00
Geoff Lancaster
da5e316c1b
Merge pull request #1 from geofflancaster/master
...
Added test cases for the empty string edge cases
2015-03-10 14:33:40 -05:00
Geoff Lancaster
54e404f911
Added test cases for the empty string edge cases
2015-03-10 14:31:35 -05:00
Ben Ramsey
57ea7ac8f9
Merge pull request #229 from vimishor/issue-185
...
Added getResponseBody method in IDPException
2015-03-10 14:09:30 -05:00
Ben Ramsey
63329259ef
Merge pull request #231 from shadowhand/patch-1
...
Add ZenPayroll to 3rd party provider list
2015-03-10 14:08:08 -05:00
Ben Ramsey
1289e8a084
Merge pull request #233 from shadowhand/patch-2
...
Stop using deprecated Travis option --dev
2015-03-10 14:02:04 -05:00
Woody Gilk
c323d4a790
Stop using deprecated Travis option --dev
...
As per recent Travis builds:
> You are using the deprecated option "dev". Dev packages are installed by default now.
2015-03-01 11:58:12 -06:00
Woody Gilk
76e04fb3cc
Add ZenPayroll to 3rd party provider list
2015-02-27 14:48:55 -06:00
Alexandru Guzinschi
c0f8ebf920
Added getResponseBody method in IDPException
...
Problem:
Some providers are sending additional information when an error occurs,
which can't be accessed because property `$result` is protected.
Solution:
Data from this property can be accessed using `getResponseBody()` method.
Closes #185
2015-02-26 12:50:11 +02:00
Ben Ramsey
a86dbd4e58
Merge pull request #227 from shadowhand/patch-1
...
Add Square to 3rd party provider links
2015-02-24 10:34:58 -06:00
Ben Ramsey
021023f642
Merge pull request #226 from shadowhand/overload-access-token-response
...
Add additional method for modifying token response
2015-02-24 10:34:43 -06:00
Ben Ramsey
ee69b69923
Merge pull request #225 from shadowhand/clean-up-providers
...
Clean out custom provider code from AccessToken
2015-02-24 10:32:36 -06:00
Woody Gilk
5caeed7d0c
Add Square to 3rd party provider links
2015-02-23 12:52:35 -06:00
Woody Gilk
4d2e8d5669
add AbstractProvider::prepareAccessTokenResult for additional token response prep
2015-02-23 12:23:37 -06:00
Woody Gilk
6373453f78
remove custom provider code from AccessToken
2015-02-23 12:15:25 -06:00
Woody Gilk
7446829c3b
replace custom code in AccessToken with Vkontakte::$uidKey
2015-02-23 12:14:37 -06:00
Ben Ramsey
e18c99c999
Merge pull request #221 from jasonvarga/patch-1
...
Add link to Dropbox provider
2015-02-12 13:50:54 -05:00
Jason Varga
3f8614ce86
Add link to Dropbox provider
2015-02-12 13:22:39 -05:00
Ben Ramsey
bb2d4e4be7
Merge pull request #220 from jasonvarga/master
...
Allow approval_prompt to be set through options
2015-02-12 12:10:16 -05:00
Jason Varga
7ec9bf717f
Remove Dropbox Provider
...
This will be moved to its own package
2015-02-12 11:49:01 -05:00
Ben Ramsey
09259e9728
Bump dev-master branch alias to 0.8.x-dev
2015-02-10 11:44:45 -06:00
Ben Ramsey
07b4641046
Merge pull request #218 from dolfelt/master
...
Get reliable body response on error.
2015-02-10 12:37:29 -05:00
Daniel Olfelt
c88b91dcda
Get reliable body response on error.
2015-02-05 15:52:06 -06:00
Ben Ramsey
2a728475d0
Merge pull request #210 from SammyK/update-facebook-scope
...
Upgrade Facebook provider to Graph v2.2
2015-02-03 18:06:22 -06:00
Ben Ramsey
362b2f9cab
Merge pull request #207 from AnduAanei/Google_access_type
...
Add support for specifying the access_type parameter for Google OAuth
2015-02-03 09:35:01 -06:00
Ben Ramsey
428a28efb1
Merge pull request #217 from tpavlek/add-twitch-client
...
Changes to additional providers
2015-02-03 09:27:33 -06:00
Troy Pavlek
b1e2858ff9
Changes to additional providers
...
Added Twitch to the additional providers, and alphabetized the list for more grokkability.
2015-02-02 13:45:18 -07:00
Ben Ramsey
5e2d5065d9
Merge pull request #201 from CloudManaged/master
...
Add FreeAgent Third Party Provider to the documentation
2015-01-30 08:36:24 -06:00
Jason Varga
993add9398
Some tests
2015-01-29 10:05:23 -05:00
Jason Varga
823774bf6e
Dropbox provider
2015-01-29 09:08:48 -05:00
Jason Varga
c918e21cdb
Allow approval_prompt to be set through options
2015-01-29 09:07:56 -05:00
Phil Sturgeon
0a59751e76
Merge pull request #211 from SammyK/kill-tabs
...
Update array syntax and spacing in README
2015-01-28 11:43:13 -05:00
SammyK
c491b47fc2
Update array syntax and spacing in README
2015-01-26 12:30:42 -06:00
SammyK
ebcb1b9abd
Upgrade Facebook provider to Graph v2.2
2015-01-26 12:22:17 -06:00
Ben Ramsey
d28e0489de
Merge pull request #208 from rakeev/patch-1
...
Remove outdated eventbrite snippet
2015-01-26 09:42:23 -06:00
Phil Sturgeon
af37027f8e
Merge pull request #209 from rchavik/github-fix
...
Fix regression for Github provider
2015-01-26 10:21:55 -05:00
Rachman Chavik
ffef5ea630
Fix regression for Github provider
...
Closes #197
Ref: https://github.com/thephpleague/oauth2-client/issues/197#issuecomment-69527969
2015-01-26 22:11:43 +07:00
Alexey
041ef04e78
Remove outdated eventbrite snippet
2015-01-26 16:17:12 +04:00
Andu
3afc1f9a05
Add docblock for the access_type variable in the Google provider
2015-01-20 14:11:23 +00:00
Andu
3af0792195
Update Google provider tests
2015-01-20 12:35:46 +00:00
Andu
6e6f1d46db
Add access_type parameter for Google authorization url
2015-01-20 12:31:49 +00:00
Geoff Lancaster
a91f3788cb
update idpexception to account for empty strings
...
Some providers (ex. Google) specify an error response object which is an empty string in cases where a 403/401 are returned. This will force the exception to check that the value isset and it is not an empty string which will help prevent the Unknown error case from occurring.
2015-01-16 15:19:14 -06:00
Israel Sotomayor
4ad71baa74
Revert "Add token as param to the fetchProviderData method"
...
This reverts commit ff344b207c
.
2015-01-09 17:58:17 +00:00