lhotari commented on code in PR #25538:
URL: https://github.com/apache/pulsar/pull/25538#discussion_r3135827206
##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/auth/oauth2/AuthenticationFactoryOAuth2.java:
##########
@@ -236,16 +304,41 @@ public ClientCredentialsBuilder
scheduler(ScheduledExecutorService scheduler) {
* @return an Authentication object
*/
public Authentication build() {
- ClientCredentialsFlow flow = ClientCredentialsFlow.builder()
- .issuerUrl(issuerUrl)
- .privateKey(credentialsUrl == null ? null :
credentialsUrl.toExternalForm())
- .audience(audience)
- .scope(scope)
- .connectTimeout(connectTimeout)
- .readTimeout(readTimeout)
- .trustCertsFilePath(trustCertsFilePath)
- .wellKnownMetadataPath(wellKnownMetadataPath)
- .build();
+ Flow flow;
+ if (tokenEndpointAuthMethod ==
TokenEndpointAuthMethod.CLIENT_SECRET_POST) {
+ flow = ClientCredentialsFlow.builder()
+ .issuerUrl(issuerUrl)
+ .privateKey(credentialsUrl == null ? null :
credentialsUrl.toExternalForm())
Review Comment:
It's odd that it's missing also from the ClientCredentialsFlow constructor.
We can omit it from this PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]