Skip to content

Authentication

The driver supports PostgreSQL authentication methods with Authenticator implementations it provides. Authenticator instances can be obtained using methods of Auth factory object and can be passed when creating connection factory configuration as follows:

val config = NettyPgConnectionFactory.Config(
       host = "pg.example.com",
       port = 5432,
       authenticator = Auth.password("user", "pass"),
       /* other options */
      )

Provided authenticators

  • PasswordAuthenticator

    Factory method: Auth.password

    This authenticator covers password and md5 authentication methods described in PostgreSQL documentation here.