Closed fernandoigual closed 7 years ago
Construct your mongo client with a typemap which converts all types to arrays. http://php.net/manual/en/mongodb.persistence.deserialization.php#mongodb.persistence.typemaps
@fernandoigual I have updated the MongoDB example in the slim-oauth2 package. Hopefully, this will help resolve your issue.
Perfect! Thank you.
Hi,
Whe I use MongoDB storage I get an error in library chadicus/slim-oauth2-middleware because expects an array instead of a BSONDocument :
Argument 1 passed to Chadicus\Slim\OAuth2\Middleware\Authorization::setToken() must be of the type array, object given, called in E:\nando\Proyectos\LemonKey\api\vendor\chadicus\slim-oauth2-middleware\src\Authorization.php on line 79
This could be fixed in ResourceController.php:69 casting token to array: