Closed hafezdivandari closed 1 year ago
Related to #94, #1637, This PR allows overriding the Laravel\Passport\Bridge\AccessToken class by calling Passport::useAccessTokenEntity.
Laravel\Passport\Bridge\AccessToken
Passport::useAccessTokenEntity
This class has convertToJWT method that can be overridden to add custom claims to JWT token, as there seems to be no other way to do this atm.
convertToJWT
PS: It may be even more convenient after this: thephpleague/oauth2-server#1328
Looking forward to use this ! C:
hi, @driesvints, Is there a possibility to add this in 10.x?
@PaolaRuby 10.x is closed for new features. Please upgrade to 11.x
Related to #94, #1637, This PR allows overriding the
Laravel\Passport\Bridge\AccessToken
class by callingPassport::useAccessTokenEntity
.Why?
This class has
convertToJWT
method that can be overridden to add custom claims to JWT token, as there seems to be no other way to do this atm.PS: It may be even more convenient after this: thephpleague/oauth2-server#1328