filsh / yii2-oauth2-server

A wrapper for implementing an OAuth2 Server(https://github.com/bshaffer/oauth2-server-php)
MIT License
332 stars 167 forks source link

How to add own field in login responce? #151

Closed GoldenDeo closed 3 years ago

GoldenDeo commented 3 years ago

How to add own field in login responce?

Example: I have - { "access_token": "access_token", "expires_in": 86400, "token_type": "Bearer", "scope": null, "refresh_token": "refresh_token" }

I need - { "access_token": "access_token", "expires_in": 86400, "token_type": "Bearer", "scope": null, "refresh_token": "refresh_token", "custom_field": "data" }

GoldenDeo commented 3 years ago

created new controller that extended filsh\yii2\oauth2server\controllers\RestController