title: How to pass credentials from nginx auth_request module to authentication server
body: <p>i am trying to authenticate client requests with nginx ngx_http_auth_request_module module but unable to forword the authentication parameters  to authentication server</p>
  
  <p>Below is the nginx configuration i am using </p>
  
  <pre><code> http {
          upstream myapp {
                  server localhost;
          }
          include       mime.types;
          default_type  application/octet-stream;
          server {
                  listen       80;
                  server_name  localhost;
                      location /{
                          auth_request     /auth;
                          location = /auth {
   internal;
                                  proxy_method POST;
                                  proxy_pass              "http://192.168.26.100:1985/resource";
                                  proxy_pass_request_body off;
                                  proxy_set_header        Content-Length "";
                                  proxy_set_header        X-Original-URI $request_uri;
                                  proxy_set_header Host       $http_host;
                                 # proxy_set_body $auth_foo;
                                  #auth_request_set $auth_foo $upstream_http_foo;
                                  #proxy_set_header x-user $user;
                                  #proxy_set_header Host $http_host;
                                  proxy_set_header X-Real-IP $remote_addr;
                                  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                          }
                  }
          }
  </code></pre>
  
  <p>i tried default proxy_method (GET) and after that i changed it to POST but without any use , is there any way that i can pass credentials to Authentication server so that i can validate the user is autherised or not,here <a href="http://192.168.26.100:1985/resource" rel="nofollow noreferrer">http://192.168.26.100:1985/resource</a> is the Authentication server url</p>
  
  <p>Thank you</p>