bshaffer / oauth2-server-php-docs

documentation for the oauth2-server-php library
231 stars 148 forks source link

JWT Access Token Payload #70

Closed 1leader closed 8 years ago

1leader commented 8 years ago

I would like to know if it is possible to add additional data to JWT Access Token Payload? For example we would like to include a user's role type in the JWT Access Token Payload. Thanks in advance!

bshaffer commented 8 years ago

Are you speaking particularly to JwtAccessTokens? If so, I think subclassing the createAccessToken function would be the most straightforward way.

1leader commented 8 years ago

Thanks so much this really helped!

Regards,

Javier Alvarez, Broker Xcellence Realty, Inc 866-595-6025 x 210

On Thu, Sep 24, 2015 at 2:18 PM, Brent Shaffer notifications@github.com wrote:

Are you speaking particularly to JwtAccessTokens? If so, I think subclassing the createAccessToken https://github.com/bshaffer/oauth2-server-php/blob/develop/src/OAuth2/ResponseType/JwtAccessToken.php#L60 function would be the most straightforward way.

— Reply to this email directly or view it on GitHub https://github.com/bshaffer/oauth2-server-php-docs/issues/70#issuecomment-143010026 .