simple file based authorization
svgkraju
nginx-forum at forum.nginx.org
Wed Feb 19 19:57:24 UTC 2020
My nginx config file is as follows:
server {
...
location / {
....
auth_request /custom_auth
....
}
location /custom_auth {
proxy_pass http://localhost:9123;
proxy_pass_request_body off;
proxy_set_header Content-Length "";
proxy_set_header Host $host;
proxy_set_header X-Original-URI $request_uri;
}
}
Client will provide URL (URL is 3rd party application) and username. URL
contains project name. I have a simple file in the same server with project
and username mapping. If mapping exists allow the URL to execute, otherwise
fail it.
How can I implement this in http://localhost:9123? Using oauth2? when I
checked many sample codes, it talks about passwords, tokens, etc., Can this
done in a much simpler manner?
Posted at Nginx Forum: https://forum.nginx.org/read.php?2,287066,287066#msg-287066
More information about the nginx
mailing list