Refactor SASL exchange to return tri-state status
authorDaniel Gustafsson
Thu, 21 Mar 2024 13:45:46 +0000 (14:45 +0100)
committerDaniel Gustafsson
Thu, 21 Mar 2024 13:45:46 +0000 (14:45 +0100)
commit24178e235ea56aca9233e640dd7ff9b17e858b07
treead742fd421ec645cb510af69bc04f04975dac3c2
parent1db689715d44276407dc4d6fadbc11da8d391bd9
Refactor SASL exchange to return tri-state status

The SASL exchange callback returned state in to output variables:
done and success.  This refactors that logic by introducing a new
return variable of type SASLStatus which makes the code easier to
read and understand, and prepares for future SASL exchanges which
operate asynchronously.

This was extracted from a larger patchset to introduce OAuthBearer
authentication and authorization.

Author: Jacob Champion 
Discussion: https://postgr.es/m/d1b467a78e0e36ed85a09adf979d04cf124a9d4b[email protected]
src/interfaces/libpq/fe-auth-sasl.h
src/interfaces/libpq/fe-auth-scram.c
src/interfaces/libpq/fe-auth.c
src/tools/pgindent/typedefs.list