Can't get the authorization header with PHP-CGI on MAMP

Süha Boncukçu Source

I use CakePHP 3.5.* on MAMP PRO. I've implemented Oauth2 to my app but can't get the Authorization header.

I've already tried adding

SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1

or

RewriteCond %{HTTP:Authorization} ^(.+)$ RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

to my .htaccess file but no chance.

I can't get the Authorization header through $request->getHeaders() or php's apache_request_headers() function.

How can I get the Authorization header to use in thephpleague's oauth2-server package?

phpcakephpoauth-2.0mampmamp-pro

Answers

comments powered by Disqus