Reputation: 2024
Usually if I want to return some data from a server, I would make a POST request with some token inside the request body:
$token = filter_input(INPUT_POST, 'token');
$request = filter_input(INPUT_POST, 'request');
But what about securing GET rest api requests? I don't want to place tokens inside the URL. How should I send a security token inside a GET request?
Upvotes: 0
Views: 123
Reputation: 1188
Place the token in the request header (for all request types,not just for GET).This is the recommended way.
Upvotes: 1