From: vlsi (@vlsi) <noreply+vlsi@github.com>
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
Subject: Re: [pgjdbc/pgjdbc] PR #4251: OAuth implementation
Date: Wed, 23 Sep 2026 06:43:34 +0000
Message-ID: <gh-pgjdbc-pgjdbc-4251-rc4079734688@github.com> (raw)
In-Reply-To: <gh-pgjdbc-pgjdbc-4251@github.com>
References: <gh-pgjdbc-pgjdbc-4251@github.com>
(on docs/content/documentation/use.md:567)
This entry needs the provider's contract:
- a public constructor taking `java.util.Properties`, or a no-argument one;
- the driver creates a new instance and calls `getToken` on every connection attempt, including once per host of a multi-host URL, so any cache must be static;
- the call happens only after the server asks for OAuth and the transport check passes, and it counts against `loginTimeout` and the server's `authentication_timeout`;
- it must return a new array every time, because the driver wipes it;
- a `PSQLException` reaches the caller unchanged, and anything else is wrapped as `OAuth token provider {0} failed to return a token`.
Please also link to the Javadoc.