- always use PKCE
- use 256 bits random data for "state"
- simplify
RandomInterface
and implementation - use separate JSON class
- remove some "setters" from
OAuthClient
class as they are only needed for testing
- no need to use
strcasecmp
- do NOT log
Authorization: Basic
request header
- include a very simple
psr/log
loggerErrorLogger
- mention
psr/log
support in the README.md
- implement support for PSR logging HTTP request and response when interacting with OAuth servers and resource servers
- update API
OAuthClient
methodsget
,post
,send
,getAuthorizeUri
,handleCallback
requireProvider
anduserId
parameters now- remove
OAuthClient::setUserId
andOAuthClient::setProvider
as they are now parameters to above mentioned methods - reduce signature of
OAuthClient
constructor, introducesetSession
,setRandom
andsetDateTime
. NOTE that these are only for testing or very special use cases, so most likely not for normal API users!
- remove
OAuthClient::hasAccessToken
as no code actually uses it - fix some
vimeo/psalm
warnings/errors
- use safe
strlen
fromparagonie/constant_time_encoding
- fix
vimeo/psalm
andphpstan/phpstan
errors and warnings
- include
Accept
header in token requests
- simplify error handling when obtaining
access_token
andrefresh_token
- modify
OAuthClient::handleCallback
to take array with query parameters, i.e.$_GET
to also handle error responses from the AS - introduce
AuthorizeException
for when OAuth server refuses to grant the authorization, e.g. the user does not allow it - make all exceptions extend
OAuthException
- introduce
TokenException
that contains a message and theResponse
object to ease debugging in case theaccess_token
is not granted due to server or configuration error - Have
Random::getHex
andRandom::getRaw
instead of one method with boolean parameter - remove PKCE, it is only useful on OAuth clients where leaking the authorization code is a risk (when not using client credentials)
Provider
MUST have secret now (because of PKCE removal)
- also support
Bearer
astoken_type
in addition tobearer
(issue #12)
- add support for PHPUnit 6
- various fixes to solve token removal in case of expiry (issue #10)
- complete rewrite of the OAuth client, everything is different
- update
RandomInterface
a bit to allow specifying the length of the secret - update (C) year
- fix a HTTP client bug where a potential non array could be returned
- remove Guzzle dependency
- be less restrictive for
paragonie/random_compat
dependency
- change license to AGPLv3+
- if token endpoint does not return a scope value, the scope from the request is assumed to be granted (according to specification)
- code cleanup
- HTTP clients should now return array instead of JSON string
- restore Guzzle client again
- remove cURL client again, too hard to get right
- use PSR-4 now
- fix
expires_in
response from token endpoint, add test for it
- remove Guzzle client
- add simple cURL client
- add API documentation
- improve input validation
- initial release