Setting headers at the controller view


#1

Hello everyone, I’m new to CakePHP but I have been using it for almost a year now. I’m doing some tryouts with a REST API that uses JWT and I’m trying to use the same code for logging into the website. Right now I’m storing the token in a header cookie (set-cookie) and I was wondering if there is a way to set the “Authorization Bearer” from a view without using the httpclient (curl like facility). Or even better set the Authorization header at the controller?


#2

Hi Samir

Would be delighted to assist you for the work.

Please add me on S k y p e: cis.garry to discuss further…

Regards
Garry Jones.


#3

https://book.cakephp.org/3.0/en/controllers/request-response.html#setting-headers