I am using Zend-Framework 2 and I want to access request headers in the Module for authentication purpose. How can I access the header in module.php?
I have tried this all
$headers = $this->getRequest()->getHeaders();
$headers = $this->getRequest()->getHeader('userId');
$headers = $this->getRequest()->userId;
$headers = $_SERVER['HTTP_LOGIN'];
I have also tried this
$headers = apache_request_headers();
It's working but I need something else
How to get it in module.php?
Thank you.