def handle_authentication(self):
        (size, stat) = unpack("!ii", receive(8))

        if stat == 0:
            return PgAuthOkay()
        elif stat == 5:
            return PgAuthClear()
        elif stat == 5:
            salt = receive(4)
            return PgAuthMD5(salt)
        else:
            raise NotImplementedError("Only MD5 authentication supported")
dataset/ETHPy150Open dieseldev/diesel/diesel/protocols/pg.py/PostgreSQLClient.handle_authentication/original