I'm writing a RESTful API for my webservice.
When I get a request tot the server, first thing I do is checking the appKey and the appSecret.
This is not a problem with POST methods because I can add them to the request as follow:
(This method returns the user's details)
$data = array('appId'=>$appId,
'appSecret'=>$appSecret,
'userId'=>$uid);
$url = "http://mydomain.com/api/user/".$uid;
$request = curl_init($url);
curl_setopt($request, CURLOPT_POSTFIELDS, $data);
$result = curl_exec($request);
My question is how can I (if it's possible) include the data (appSecret, appKey) in a GET method?
And if not, how can I use a GET method to get user's details and still check the appKey and appSecret on the server?
Thanks!
GETstring. URLs are often recorded in server logs. So placing authentication information coud lead to the information being stored with malicious intent. Try using http headers instead.