Message-ID: From: "sehrope (@sehrope)" To: "pgjdbc/pgjdbc" Date: Wed, 17 Dec 2025 13:00:50 +0000 Subject: Re: [pgjdbc/pgjdbc] PR #3895: implement require_auth, this is pretty much how libpq does this. In-Reply-To: References: List-Id: X-GitHub-Author-Login: sehrope X-GitHub-Comment-Id: 2626984059 X-GitHub-Comment-Type: review_comment X-GitHub-Commit: 9700e283cb4746b1f3d6d290cc5070260ddc1669 X-GitHub-Issue: 3895 X-GitHub-Path: pgjdbc/src/main/java/org/postgresql/core/v3/ConnectionFactoryImpl.java X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-Type: review_comment X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/pull/3895#discussion_r2626984059 Content-Type: text/plain; charset=utf-8 (on pgjdbc/src/main/java/org/postgresql/core/v3/ConnectionFactoryImpl.java) Can put all of this logic in the enum itself and expose a single method to check the auth mode vs the connection's actual value. So it'd just be `public static void check(String requireAuth, String authMethod)`. That'd make the logic itself easier to unit test vs all the possible server configs. Would still be good to have some server related coverage for it as well, but we could do something pretty exhaustive in the unit test.