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
Woody Gilk
844df96de4
add ProviderInterface::getHeaders() for making authenticated requests
2015-03-10 15:50:53 -05:00
Woody Gilk
4d2e8d5669
add AbstractProvider::prepareAccessTokenResult for additional token response prep
2015-02-23 12:23:37 -06: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
Daniel Olfelt
c88b91dcda
Get reliable body response on error.
2015-02-05 15:52:06 -06:00
Jason Varga
c918e21cdb
Allow approval_prompt to be set through options
2015-01-29 09:07:56 -05:00
jeremykendall
0d25e02de7
Adds AbstractProvider::fetchProviderData().
...
New protected method is responsible for making the request to a
provided URL, allowing for multiple API endpoints to be used within the same
provider.
AbstractProvider::fetchUserDetails() remains, but now only builds the
user details URL and passes it to AbstractProvider::fetchProviderData().
2014-12-29 04:08:16 -06:00
Ben Ramsey
e5efa75cff
Merge pull request #163 from bajb/master
...
Improvements to AbstractProvider
2014-12-15 14:17:27 -06:00
Brooke Bryan
bc3845d9e5
Code style improvements
2014-12-15 18:17:29 +00:00
Ben Ramsey
6684093ae0
Updating PHP Code Sniffer and fixing some CS violations
2014-12-15 11:57:30 -06:00
Brooke Bryan
85d88a449e
Provide base methods for userUid, userEmail and userScreenName + Tests
2014-12-03 18:10:25 +00:00
Jildert Miedema
55de45401e
cs fix
2014-12-01 23:13:35 +01:00
Jildert Miedema
e8573b1df4
inserting a redirect callback
2014-12-01 23:10:06 +01:00
Ben Ramsey
c4c8c23df3
Use property_exists() instead of isset() in AbstractProvider ( fixes #134 )
2014-11-28 16:11:26 -05:00
Troy Pavlek
5a609fd566
Added some documentation detailing custom uids
2014-11-28 09:56:52 -07:00
Troy Pavlek
a0eee9f111
Removed extra space in conditional
2014-11-28 09:23:54 -07:00
Troy Pavlek
44f7c19b07
Draft implementation of properly setting UIDs in a provider specific fashion
2014-11-27 09:02:48 -07: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
Graham Campbell
ca6745027a
CS fixes
2014-11-08 21:30:40 +00:00
Dustin Wheeler
031fa0ec83
Fixes PSR formatting causing build failures.
2014-10-22 21:31:27 -04:00
Paul M. Jones
f780b18fef
add an interface for injection typehints
2014-07-08 10:35:08 -05:00
Cy
26adb5081b
Expose generated state to allow for CSRF validation.
2014-06-08 12:25:03 -07:00
Phil Sturgeon
f559ca1dd5
Fixed #90 : Authoriztioncode v AuthoriztionCode
2014-05-04 18:51:12 +01:00
Phil Sturgeon
424b15d4a8
Fixed PHPCS issues.
2014-05-03 11:55:30 +01:00
Tom Anderson
0f3c8002b6
Add specific check for HHVM
2014-04-28 15:55:00 -07:00
Tom Anderson
2bb4084602
Don't use PHP constant; use constant value instead to support hhvm
2014-04-28 15:55:00 -07:00
Tom Anderson
ec97b7d811
Renamed IdentityProvider to AbstractProvider
2014-04-28 15:55:00 -07:00