File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -172,6 +172,8 @@ extern bool Db_user_namespace;
172
172
#define AUTH_REQ_GSS 7 /* GSSAPI without wrap() */
173
173
#define AUTH_REQ_GSS_CONT 8 /* Continue GSS exchanges */
174
174
#define AUTH_REQ_SSPI 9 /* SSPI negotiate without wrap() */
175
+ #define AUTH_REQ_SASL 10 /* SASL authentication. Not supported before
176
+ * libpq version 10. */
175
177
176
178
typedef uint32 AuthRequest ;
177
179
Original file line number Diff line number Diff line change @@ -961,6 +961,19 @@ pg_fe_sendauth(AuthRequest areq, PGconn *conn)
961
961
return STATUS_ERROR ;
962
962
break ;
963
963
964
+ /*
965
+ * SASL authentication was introduced in version 10. Older
966
+ * versions recognize the request only to give a nicer error
967
+ * message. We call it "SCRAM authentication" in the error, rather
968
+ * than SASL, because SCRAM is more familiar to users, and it's
969
+ * the only SASL authentication mechanism that has been
970
+ * implemented as of this writing, anyway.
971
+ */
972
+ case AUTH_REQ_SASL :
973
+ printfPQExpBuffer (& conn -> errorMessage ,
974
+ libpq_gettext ("SCRAM authentication requires libpq version 10 or above\n" ));
975
+ return STATUS_ERROR ;
976
+
964
977
default :
965
978
printfPQExpBuffer (& conn -> errorMessage ,
966
979
libpq_gettext ("authentication method %u not supported\n" ), areq );
You can’t perform that action at this time.
0 commit comments