Commit Graph

62 Commits (master)

Author SHA1 Message Date
Vitaliy Filippov b789b77c07 Simplify everything
* Remove useless wrapper code (IDPException, Entity\User, Grant\*, httpBuildQuery)
* Remove useless getUserUid(), getUserEmail(), getUserScreenName() methods that throw away remote-fetched data
* Do not depend on Guzzle, use just cURL instead
* Shorten namespace name and remove sub-namespaces
* Do not use Mockery in tests, use custom cURL mock instead (TESTS STILL PASS)
2015-04-19 00:29:09 +03:00
Phil Sturgeon 0a9d2e8efb Revert "Removing Eventbrite support and adding link in readme to new package" 2015-03-21 13:17:51 -04:00
Steven Maguire c6fa377634 removing eventbrite and adding link in readme 2015-03-21 11:27:33 -05:00
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 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 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
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
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 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
SammyK ebcb1b9abd Upgrade Facebook provider to Graph v2.2 2015-01-26 12:22:17 -06: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
Andu 3af0792195 Update Google provider tests 2015-01-20 12:35:46 +00:00
hiroshi honma 707917df01 Fix UserTest.php namespace 2015-01-08 20:17:22 +09:00
jeremykendall 63d4bc6d94 Adds emails endpoint to GithubTest::testGithubEnterpriseDomainUrls 2014-12-29 04:19:32 -06:00
jeremykendall 8c0ae57065 Adds methods that fetch a Github user's email addresses. 2014-12-29 04:10:56 -06:00
Ben Ramsey a3fd10e9cf Merge pull request #187 from geofflancaster/master
update google scopes and endpoint to remove deprecated values
2014-12-29 05:01:03 -05:00
Sergio Vera 3df7382ee1 Added tests 2014-12-23 17:25:56 +01:00
Geoff 188be5bddd update google scopes and endpoint to remove deprecated values 2014-12-17 21:15:34 -06:00
Brooke Bryan bc3845d9e5 Code style improvements 2014-12-15 18:17:29 +00:00
Brooke Bryan 85d88a449e Provide base methods for userUid, userEmail and userScreenName + Tests 2014-12-03 18:10:25 +00:00
Ben Ramsey 6629d50396 Merge pull request #167 from thephpleague/microsoft-oauth-endpoints
Updating authorize and token URLs for MSFT, according to #146
2014-12-03 09:38:13 -06:00
Ben Ramsey c8ce5f357b Merge pull request #155 from jildertmiedema/teardown
Teardown
2014-12-02 07:51:49 -06:00
Ben Ramsey 76fa1614fd Merge pull request #171 from jildertmiedema/coverage
coverage of exception
2014-12-02 07:47:43 -06:00
Jildert Miedema e8573b1df4 inserting a redirect callback 2014-12-01 23:10:06 +01:00
Jildert Miedema 7f4f5a501d coverage of exception 2014-12-01 21:42:43 +01:00
Jildert Miedema 38d925d862 testing protected setResultUid 2014-12-01 08:18:00 +01:00
Jildert Miedema b1864dcf65 fix cs 2014-12-01 08:05:26 +01:00
Jildert Miedema 03917c598d fix cs 2014-12-01 08:04:12 +01:00
Jildert Miedema 0f4b8503b8 remove unused assertions 2014-12-01 08:03:06 +01:00
Jildert Miedema 56a0c57ae0 changed FQCN mockery 2014-11-30 23:08:54 +01:00
Jildert Miedema e76f515750 add mockery close and correct the test count 2014-11-30 22:57:45 +01:00
Jildert Miedema 3384cb56c8 Merge remote-tracking branch 'origin/master' into teardown
Conflicts:
	test/src/Provider/MicrosoftTest.php
2014-11-30 22:50:12 +01:00
Ben Ramsey c4c8c23df3 Use property_exists() instead of isset() in AbstractProvider (fixes #134) 2014-11-28 16:11:26 -05:00
Ben Ramsey f202e423d9 Add test to cover Provider\Microsoft::urlAuthorize() 2014-11-28 15:48:35 -05:00
Ben Ramsey 954d043409 Fixing broken test for urlAccessToken() 2014-11-28 15:47:11 -05:00
Ben Ramsey cfa35efc24 Merge pull request #154 from jildertmiedema/tests
tested expired_in
2014-11-28 15:18:12 -05:00
Ben Ramsey b3e449ee6b Merge branch 'master' of github.com:aripringle/oauth2-client into aripringle-master
Conflicts:
	test/src/Provider/GoogleTest.php
2014-11-28 14:48:42 -05:00
Ben Ramsey 1eed232b5a Merge pull request #158 from GrahamCampbell/cs
CS Fixes
2014-11-27 17:01:33 -05:00
Matus Zeman ce1915643c state param for AbstractProvider::getAuthorizationUrl() 2014-11-26 14:57:23 +01:00
Kevin Dierkx 6f3a2a90f8 Added ClientCredentials and Password Grants including tests 2014-11-20 11:39:02 +01:00
Graham Campbell ca6745027a CS fixes 2014-11-08 21:30:40 +00:00
Jildert Miedema d63a2614af times changed to get tests passed 2014-10-27 23:43:57 +01:00
Jildert Miedema 070e950f8a add tear down to tests 2014-10-27 23:22:36 +01:00
Jildert Miedema 8ee37118cd tested expired_in 2014-10-27 21:55:38 +01:00
Ari Pringle 64250a71d9 increase test coverage 2014-07-01 09:41:49 -06:00
Ari Pringle f4ddf1f34d fix whitespace 2014-06-30 11:41:03 -06:00