Asyncpg should also support using HASH objects or pre-hashed strings. Also, I would suggest that once the authentication method has been identified (e.g. md5, sha, no-hash) then the password should be morphed. As it currently stands, the password can be retrieved in plain text by other libraries that have access to the Connection or Pool objects.
# malicious code can easily get away with this:
print(pool._connection_kwargs['password'])
Asyncpg should also support using HASH objects or pre-hashed strings. Also, I would suggest that once the authentication method has been identified (e.g. md5, sha, no-hash) then the password should be morphed. As it currently stands, the password can be retrieved in plain text by other libraries that have access to the Connection or Pool objects.