lua-resty-postgres icon indicating copy to clipboard operation
lua-resty-postgres copied to clipboard

Support 'trust' authentication method

Open alexdowad opened this issue 2 years ago • 0 comments

In the PostgreSQL server's response to the initial login packet, it includes a field indicating what kind of authentication the server would like the client to use. We were not checking that field. If it is 0, that means no authentication is needed and the client can just go ahead.

As a bonus, since we are now checking the value of that field, we can provide a more specific error message if the server wants to use an authentication type which this library does not currently support.

This code is working on my own installation of Nginx + Postgres 14.

alexdowad avatar Apr 18 '22 09:04 alexdowad