Hello guys!
I have a question related to intercepting Authorization popup.
I have a site that uses basic User name / Password authentication. I have created a nice html page to accept the username & password + few other parameters from the user. Now I am ready to pass this on to the system.
- Server runs on Port: 80
- http://localhost -> takes the user to the fancy login page (username/password/few other parameters)
- User click the submit button the request gets posted to /validate/
location /validate/
{
set_form_input $username;
set_form_input $password;
set $auth_raw "$username:$password";
set_encode_base64 $digest $auth_raw; # $digest = some_hash_value
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Authorization "Basic <<<some_hash_value>>>"; # This works
#proxy_set_header Authorization "Basic $digest"; # This does not work
}
My question is how can I pass dynamic $digest value to the Autorization header.
Any help is much appericiated! Thanks.
LD
I have a question related to intercepting Authorization popup.
I have a site that uses basic User name / Password authentication. I have created a nice html page to accept the username & password + few other parameters from the user. Now I am ready to pass this on to the system.
- Server runs on Port: 80
- http://localhost -> takes the user to the fancy login page (username/password/few other parameters)
- User click the submit button the request gets posted to /validate/
location /validate/
{
set_form_input $username;
set_form_input $password;
set $auth_raw "$username:$password";
set_encode_base64 $digest $auth_raw; # $digest = some_hash_value
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Authorization "Basic <<<some_hash_value>>>"; # This works
#proxy_set_header Authorization "Basic $digest"; # This does not work
}
My question is how can I pass dynamic $digest value to the Autorization header.
Any help is much appericiated! Thanks.
LD