Skip to Content
Aug 21, 2017 at 12:58 PM

Customize OAuth2 default service to get access token along with additional attributes


HI All,

We have a requirement to customize the response of localhost:9001/rest/oauth/token

We need some additional info to be passed in the same service. Something like below structure

"tokens" : { "access_token": "fe4d1558-7e4b-4a3b-878d-d508027f9eb2", "token_type": "bearer", "refresh_token": "825de319-f6db-420a-86d0-e3d012260d1f", "expires_in": 43199, "scope": "basic", }, "user" : { "account" : { "accountId" :213, "name" :some name } }

I found the class, but this just adds a string in writer not the custom object(DTO). Even not sure from where this gets called?

Please guide if anyone has any idea on this.

Regards, Deepali