2 ms·
How does one do user authentication and resource authorization?
by stevewilhelm 13y ago
How does one do user authentication and resource authorization?
- mp3jeep01 13y agoYou can easily do AuthBasic in nginx with a user file
- jahewson 13y agoPresumably with an 'api_key' table and an 'Authorization' header. Alternatively, Nginx can do cookies and have if-then logic to check them.
- jallmann 13y agoAuth Basic can be done directly against postgres, plus a few more modules (headers-more and eval was how I did it, IIRC). Could probably do it with just openresty too. After authentication, you have the credentials needed check authorization, it'd probably just involve a few changes to the SQL in the article.