Hi - I am using CentOS 7.3 and trying to receive basic authentication.
I run a command liked: curl -X POST -u jerry:pw http://192.168.1.8/inbound.cgi
When I use printenv in the cgi I do not see the user and password anywhere. Isn't it supposed to be there in an environment variable like REMOTE_USER ?
How do I receive the basic authentication ?
Thanks,
Jerry
On Thu, May 11, 2017 at 07:56:00AM -0400, Jerry Geis wrote:
Hi - I am using CentOS 7.3 and trying to receive basic authentication.
I run a command liked: curl -X POST -u jerry:pw http://192.168.1.8/inbound.cgi
When I use printenv in the cgi I do not see the user and password anywhere. Isn't it supposed to be there in an environment variable like REMOTE_USER ?
Is this a 'curl' question, a 'How do you write CGI?' question or a general question about how HTTP works?
Is this a 'curl' question, a 'How do you write CGI?' question or a general question about how HTTP works?
Hi Jonathan,
This was just a general question on why I'm not seeing what I expected. I'm using CentOS 7.3, I have written CGI for years (not using user & pass), I've used http for years - I was just hoping someone might be able to shed some light on why I'm not seeing the REMOTE_USER. I did several searches and did not find any resolution.
Thanks for any pointers.
Jerry
Date: Thursday, May 11, 2017 14:53:28 -0400 From: Jerry Geis jerry.geis@gmail.com
Is this a 'curl' question, a 'How do you write CGI?' question or a general question about how HTTP works?
Hi Jonathan,
This was just a general question on why I'm not seeing what I expected. I'm using CentOS 7.3, I have written CGI for years (not using user & pass), I've used http for years - I was just hoping someone might be able to shed some light on why I'm not seeing the REMOTE_USER. I did several searches and did not find any resolution.
I can't tell from your description if this might be the issue, but you will only see the REMOTE_USER value if the resource being requested requires basic authentication. You don't see it, even if passed, on pages where authentication isn't required.