izumo27 commented on code in PR #25538:
URL: https://github.com/apache/pulsar/pull/25538#discussion_r3135532440
##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/auth/oauth2/AuthenticationFactoryOAuth2.java:
##########
@@ -92,18 +94,35 @@ public static class ClientCredentialsBuilder {
private URL issuerUrl;
private URL credentialsUrl;
+ private TokenEndpointAuthMethod tokenEndpointAuthMethod =
TokenEndpointAuthMethod.CLIENT_SECRET_POST;
+ private String clientId;
+ private String tlsCertFile;
+ private String tlsKeyFile;
private String audience;
private String scope;
private Duration connectTimeout;
private Duration readTimeout;
private String trustCertsFilePath;
private String wellKnownMetadataPath;
+ private Duration autoCertRefreshDuration;
private double earlyTokenRefreshPercent =
AuthenticationOAuth2.EARLY_TOKEN_REFRESH_PERCENT_DEFAULT;
private ScheduledExecutorService scheduler;
private ClientCredentialsBuilder() {
}
+ /**
+ * Optional token endpoint auth method.
+ * Defaults to {@code client_secret_post}.
+ *
+ * @param tokenEndpointAuthMethod the token endpoint auth method
+ * @return the builder
+ */
+ public ClientCredentialsBuilder
tokenEndpointAuthMethod(TokenEndpointAuthMethod tokenEndpointAuthMethod) {
+ this.tokenEndpointAuthMethod = tokenEndpointAuthMethod;
Review Comment:
If the authMethod is not supported, `IllegalArgumentException` is thrown.
https://github.com/apache/pulsar/pull/25538/changes#diff-4f723fd0ecb3c2991751d5391084a4f8a6a6aa65e5ca35a28864c382ae5603b6R340
--
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]