INNER CODE UNIT · C
auth_type
pgbouncer/pgbouncer · src/client.c:78
int auth_type = client->client_auth_type;
if (user->mock_auth)
return false;
/* disallow empty passwords */
if (!*user->passwd)
return false;
switch (auth_type) {
case AUTH_TYPE_PLAIN:
switch (get_password_type(user->passwd)) {
case PASSWORD_TYPE_PLAINTEXT:
return strcmp(user->passwd, passwd) == 0;
case PASSWORD_TYPE_MD5: {
char md5[MD5_PASSWD_LEN + 1];
if (!pg_md5_encrypt(passwd, user->name, strlen(user->name), md5))
return false;