A
A
Alexander2021-07-09 12:16:19
symfony
Alexander, 2021-07-09 12:16:19

How can the response JWTAuthenticationBundle be modified?

The project uses JWTAuthenticationBundle for authorization by token.
At the moment, in case of successful authorization, a json with a token is returned to the client.
I intercept the successful authorization event in the plugin (sylius-shop-api) , but I have no idea how to modify the response.
I need to add one more parameter to the response

{
    "token": "token-value",
    "cartToken": "value"
}

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Fedorov, 2021-07-09
@alexmixaylov

Is this the bundle? https://github.com/lexik/LexikJWTAuthenticationBundle
If yes, then like this:
https://github.com/lexik/LexikJWTAuthenticationBun...

A
Alexander, 2021-07-09
@alexmixaylov

You have to be so stupid, I watched everything, but not the dock to the bundle

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question