Sorry for php newbie question. I have authentication.service.js
in my application, where I encode user's password
and send it to the web api (which is php
using lumen
framework). I have do it like this:
function Login(credentials, callback) {debugger;
$http.post('http://localhost/credentials/' + credentials, {cache: false})
.then(function (response) {
callback(response.data);
});
}
so actually it looks like: http://localhost/credentials/somesecretpassword
How should I work with it from php
side? Currently I have call this:
$app->post('/credentials/{password}', 'AdminController@getCredentials');
But I'm not sure how it should work!, how do I check if password exists! Is it possible to do it that way or I shouldn't return credentials like this??
Thanks