Symfony 5 Api Platform JWT Token: Best way to get user data

I have Entity Users and if i call:

  1. http://example.com/api/login_check – i get token
  2. http://example.com/api/users – i get all users (with token in header)
  3. http://example.com/api/users/1 – i get specific user (withtoken in header)
  4. http://example.com/api/user – i want to get user who is logged with provided token form 1.

Is there any way to be create on User entity, or i need to create Controller and develop the route ?
Thanks in advice

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *