API Platform Crash Course Part 16: Adding Authentication to Tests

preview_player
Показать описание
ℹ This is a crash course on the API Platform which is intended to get you writing your own API's as quickly as possible. In part 16, we'll update our tests so that we are making the requests using valid api tokens...and we'll also fix a potential security issue.

💻Source code here:

👇Follow me on Social Media:

💕Show support:

💻If you are just consuming your own API and you want traditional session authentication then check out this Symfonycasts tutorial:
Рекомендации по теме
Комментарии
Автор

Great suff very helpful! You might instead, return true in the support(), but the simply set {path: ^/api, role: IS_AUTHENTICATED_FULLY} in security.yml

SimonSarrafi
Автор

Am I missing something here ? Do you cover actually setting up an oauth2 server to generate actual tokens or are you leaving it at the bin2hex 60 bytes ?

rbnzdave