Hello, we nead somehow to add data in the answer from “http://localhost:8080/app/rest/v2/oauth/token ”.
now this endpoint returns:
{
"access_token": "29bc6b45-83cd-4050-8c7a-2a8a60adf251",
"token_type": "bearer",
"refresh_token": "e765446f-d49e-4634-a6d3-2d0583a0e7ea",
"expires_in": 43198,
"scope": "rest-api"
}
But we need something like:
{
"access_token": "29bc6b45-83cd-4050-8c7a-2a8a60adf251",
"token_type": "bearer",
"refresh_token": "e765446f-d49e-4634-a6d3-2d0583a0e7ea",
"expires_in": 43198,
"scope": "rest-api"
"role": [ "43242446f-d49e-41234-a643-2d21543a02345"']
}
But we would like to avoid create custom REST controller because we already have a lot of REST cliens that use this url “http://localhost:8080/app/rest/v2/oauth/token ”. Could you help me please we this problem.
Thank you in advance.
albudarov
(Alexander Budarov)
December 21, 2022, 8:45am
#2
Hi,
Similar questions have been asked on the forum previously, not much has changed in CUBA since then:
Hi, After generating the Oauth Token successfully. We get the response as :
{
"access_token": "29bc6b45-83cd-4050-8c7a-2a8a60adf251",
"token_type": "bearer",
"refresh_token": "e765446f-d49e-4634-a6d3-2d0583a0e7ea",
"expires_in": 43198,
"scope": "rest-api"
}
I want to add a small paragraph of text below scope. How can I do that?
Hi,
The standard auth token have only this information.
{
“access_token”: “f6b932ca-3c33-436c-ba94-8253a5ed3912”,
“token_type”: “bearer”,
“expires_in”: 43199,
“scope”: “rest-api”
}
and i need something like:
{
“access_token”: “f6b932ca-3c33-436c-ba94-8253a5ed3912”,
“token_type”: “bearer”,
“expires_in”: 43199,
“scope”: “rest-api”,
“foo”:“bar”
}
The product owner want extend this token and include some values, like user name. He wants reduce the quantity of requests, providing …