diff --git a/composer.json b/composer.json index 642c009..77789d7 100644 --- a/composer.json +++ b/composer.json @@ -17,8 +17,7 @@ "ext-gmp": "*", "ramsey/uuid": "^3.7", "guzzlehttp/guzzle": "^6.3", - "spomky-labs/jose": "^6.1", - "lcobucci/jwt": "4.0.0-alpha1" + "spomky-labs/jose": "^6.1" }, "require-dev": { "phpspec/phpspec": "^4.0" diff --git a/composer.lock b/composer.lock index 5ee428f..c756b38 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "6225b582cbdd72f28104d4d0ba54b350", - "content-hash": "8c349f0c72ef182d017765c379d938cf", + "hash": "954f3573fd348b939e79ad9e16ae6d97", + "content-hash": "f0b23ccb6f509fd6652fe6da03749585", "packages": [ { "name": "beberlei/assert", @@ -312,161 +312,6 @@ ], "time": "2017-03-20 17:10:46" }, - { - "name": "lcobucci/clock", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/lcobucci/clock.git", - "reference": "bc2caa64a8a1fda18431d12c623d2059cfc667f4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/lcobucci/clock/zipball/bc2caa64a8a1fda18431d12c623d2059cfc667f4", - "reference": "bc2caa64a8a1fda18431d12c623d2059cfc667f4", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "phpunit/phpunit": "^6.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-4": { - "Lcobucci\\Clock\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Luís Cobucci", - "email": "lcobucci@gmail.com" - } - ], - "description": "Yet another clock abstraction", - "time": "2017-05-07 19:02:47" - }, - { - "name": "lcobucci/jose-parsing", - "version": "2.2.0", - "source": { - "type": "git", - "url": "https://github.com/lcobucci/jose-parsing.git", - "reference": "ea0eaed79c3a5ca9ece3f824ecfe1e798fd1e1f4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/lcobucci/jose-parsing/zipball/ea0eaed79c3a5ca9ece3f824ecfe1e798fd1e1f4", - "reference": "ea0eaed79c3a5ca9ece3f824ecfe1e798fd1e1f4", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "phpmd/phpmd": "^2.3", - "phpunit/phpunit": "^6.0", - "squizlabs/php_codesniffer": "^2.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2-dev" - } - }, - "autoload": { - "psr-4": { - "Lcobucci\\Jose\\Parsing\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Luís Otávio Cobucci Oblonczyk", - "email": "lcobucci@gmail.com", - "role": "Developer" - } - ], - "description": "A basic Base64Url and JSON encoding/decoding implementation", - "keywords": [ - "JOSE", - "base64url" - ], - "time": "2017-02-12 22:14:17" - }, - { - "name": "lcobucci/jwt", - "version": "4.0.0-alpha1", - "source": { - "type": "git", - "url": "https://github.com/lcobucci/jwt.git", - "reference": "30969dac05855cf0123b2a8809c77542aba85dfa" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/lcobucci/jwt/zipball/30969dac05855cf0123b2a8809c77542aba85dfa", - "reference": "30969dac05855cf0123b2a8809c77542aba85dfa", - "shasum": "" - }, - "require": { - "ext-openssl": "*", - "lcobucci/clock": "^1.0", - "lcobucci/jose-parsing": "~2.1", - "php": "^7.1" - }, - "require-dev": { - "mdanter/ecc": "^0.4", - "mikey179/vfsstream": "^1.6", - "phpmd/phpmd": "^2.5", - "phpunit/php-invoker": "^1.1", - "phpunit/phpunit": "^6.0", - "squizlabs/php_codesniffer": "^2.7" - }, - "suggest": { - "mdanter/ecc": "Required to use Elliptic Curves based algorithms." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Lcobucci\\JWT\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Luís Cobucci", - "email": "lcobucci@gmail.com", - "role": "Developer" - } - ], - "description": "A simple library to work with JSON Web Token and JSON Web Signature", - "keywords": [ - "JWS", - "jwt" - ], - "time": "2017-05-07 21:25:30" - }, { "name": "mdanter/ecc", "version": "v0.4.3", @@ -2193,9 +2038,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "lcobucci/jwt": 15 - }, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { diff --git a/src/Client.php b/src/Client.php index a6d6c66..5855168 100644 --- a/src/Client.php +++ b/src/Client.php @@ -89,7 +89,7 @@ public function exchangeToken($jwtToken) $userData = $this->decrypt($userData); } - return new UserData($payload->userId, \GuzzleHttp\json_decode($userData)); + return new UserData($payload->userId, \GuzzleHttp\json_decode($userData, true)); } /**