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:33 +0000
Message-ID: <gh-pgjdbc-pgjdbc-4251-rc4079734544@github.com> (raw)
In-Reply-To: <gh-pgjdbc-pgjdbc-4251@github.com>
References: <gh-pgjdbc-pgjdbc-4251@github.com>
(on pgjdbc/src/main/java/org/postgresql/core/v3/ConnectionFactoryImpl.java:442)
The driver creates a new provider instance on every connection attempt, including each failover retry. Please document this in the `OAuthTokenProvider` Javadoc and in `use.md`, and say that an implementation should be a lightweight bridge to a layer that caches the token (a cloud SDK credential, a token file), or keep its cache in a static field keyed by everything that affects the token, the client secret and the user included.