Description
Trying to add support and test v9-rc1 before stable release on Laravel Passport, PR laravel/passport#1734, there are 2 issues:
- User ID doesn't accept integer
- Client ID doesn't accept integer
You may check the failed tests here: https://github.com/laravel/passport/actions/runs/8482967241/job/23243211337?pr=1734
Both User
and Client
classes of Laravel Passport are using League\OAuth2\Server\Entities\Traits\EntityTrait
.
-
This trait accepts
mixed
id on set but returnstring
on get:oauth2-server/src/Entities/Traits/EntityTrait.php
Lines 22 to 33 in ca511c1
-
Also on the
TokenInterface
class,$userIdentifier
type doesn't match on set / get :oauth2-server/src/Entities/TokenInterface.php
Lines 39 to 49 in ca511c1
-
On
AccessTokenRepositoryInterface
the$userIdentifier
property acceptsmixed
: -
On
AbstractGrant
class,getClientEntityOrFail
method accepts only string$clientId
and not int:oauth2-server/src/Grant/AbstractGrant.php
Line 187 in ca511c1
-
On
ClientRepositoryInterface
class,getClientEntity
andvalidateClient
methods,$clientIdentifier
argument doesn't accept int:oauth2-server/src/Repositories/ClientRepositoryInterface.php
Lines 25 to 30 in ca511c1