pgjdbc/pgjdbc GitHub issues and pull requests (mirror)  
help / color / mirror / Atom feed
From: artemgavrilov (@artemgavrilov) <[email protected]>
To: pgjdbc/pgjdbc <[email protected]>
Subject: Re: [pgjdbc/pgjdbc] issue #3816: Implement OAUTHBEARER to support PostgreSQL 18 OAuth flow
Date: Tue, 05 May 2026 14:09:30 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

> Don't we already have something like this via AuthenticationPlugin?
> 
> https://github.com/pgjdbc/pgjdbc/blob/master/pgjdbc/src/main/java/org/postgresql/plugin/Authenticati...

Yep, probably this interface can be extended with something like this:
```
// This differs from getPassword in the way were it's invoked. Password can be fetched when authenticator created because 
// it hasn't TTL, while token should be fetched right before connection creation. This method will cover case A, when user 
// knows how and where to obtain token.
char @Nullable [] getToken(AuthenticationRequestType type) throws PSQLException;

// This is for case B, when PG returns information how to obtain token. If this method is not implemented we may fallback to
// just logging this info. 
char @Nullable [] getToken(AuthenticationRequestType type, Scope scope, URL url) throws PSQLException;
```

Please note that it's just a high level thoughts, I'm still digging sources to find a proper solution.

view thread (8+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: github://pgjdbc/pgjdbc
  Cc: [email protected], [email protected]
  Subject: Re: [pgjdbc/pgjdbc] issue #3816: Implement OAUTHBEARER to support PostgreSQL 18 OAuth flow
  In-Reply-To: <<[email protected]>>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox