Currently, it's easy to implement the convertToJWT method in the AccessTokenEntityInterface implementation to add data to the JWT. However, i don't see any solution, except creating a new implementation of BearerTokenValidator, to add additional attributes from the token, to the returning ServerRequestInterface object.
I think this PR can provide a way to simply override the BearerTokenValidator::appendAttributesFromClaims() method and pass the custom BearerTokenValidator instance to the ResourceServer instance.
Currently, it's easy to implement the
convertToJWT
method in theAccessTokenEntityInterface
implementation to add data to the JWT. However, i don't see any solution, except creating a new implementation ofBearerTokenValidator
, to add additional attributes from the token, to the returningServerRequestInterface
object.I think this PR can provide a way to simply override the
BearerTokenValidator::appendAttributesFromClaims()
method and pass the customBearerTokenValidator
instance to theResourceServer
instance.Complement of #1328 Alternative of #851