Luckily I found an issue thread in ZfcUser Git Project, and with some tutorial, I come to a solution that work for me. I know it's not the best way, but I want to share for anyone, beginner like me, find a simple way to do authentication and move on to more complex Zend stuff later.
Update: after a while of working with Zend, then I realized that I need not to use Restful for my authentication, I just need to use normal action that will get the POST and return a json file.
use Zend\View\Model\JsonModel;
// Your class
// ...
public function jsonAction(){
// Your code
return new JsonModel(array(
'tag' => 'login',
'success' => 0,
'error' => 1,
'error_msg' => 0,//$this->failedLoginMessage,
));
}
Update 2: If you are thinking about Restful WS, you should investigate some about it first here . As I did from the beginning, trying to use Restful to do authentication is totally wrong. :)