lhotari commented on code in PR #25538:
URL: https://github.com/apache/pulsar/pull/25538#discussion_r3135820663
##########
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 looks like `.clientId(clientId)` has been missing for
ClientCredentialsFlow. It would be useful to add it since this PR touches these
lines.
--
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]