Search code examples
phphttphttp-authentication

Can I use "HTTP authorization" in HTTPS protocol?


Can I Use HTTP authorization in HTTPS protocol?

I mean I will use following code in PHP.

header("WWW-Authenticate: Basic realm=\"Admin authorization\"");
header("HTTP/1.0 401 Unauthorized");

and

echo $_SERVER["PHP_AUTH_USER"];
echo $_SERVER["PHP_AUTH_PW"];

Solution

  • Yes. HTTP is HTTP even if you put it through a secure tunnel.