#define AUTH_REQ_GSS 7 /* GSSAPI without wrap() */
#define AUTH_REQ_GSS_CONT 8 /* Continue GSS exchanges */
#define AUTH_REQ_SSPI 9 /* SSPI negotiate without wrap() */
+#define AUTH_REQ_SASL 10 /* SASL authentication. Not supported before
+ * libpq version 10. */
typedef uint32 AuthRequest;
return STATUS_ERROR;
break;
+ /*
+ * SASL authentication was introduced in version 10. Older
+ * versions recognize the request only to give a nicer error
+ * message. We call it "SCRAM authentication" in the error, rather
+ * than SASL, because SCRAM is more familiar to users, and it's
+ * the only SASL authentication mechanism that has been
+ * implemented as of this writing, anyway.
+ */
+ case AUTH_REQ_SASL:
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("SCRAM authentication requires libpq version 10 or above\n"));
+ return STATUS_ERROR;
+
default:
printfPQExpBuffer(&conn->errorMessage,
libpq_gettext("authentication method %u not supported\n"), areq);