michaeljmarshall commented on code in PR #20030:
URL: https://github.com/apache/pulsar/pull/20030#discussion_r1176006164


##########
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationProviderToken.java:
##########
@@ -158,19 +164,18 @@ public String getAuthMethodName() {
 
     @Override
     public String authenticate(AuthenticationDataSource authData) throws 
AuthenticationException {
+        String token;
         try {
             // Get Token
-            String token;
             token = getToken(authData);

Review Comment:
   Is it possible to increment the `INVALID_AUTH_DATA` error in the `getToken` 
method? 



##########
pulsar-broker-auth-oidc/src/main/java/org/apache/pulsar/broker/authentication/oidc/AuthenticationProviderOpenID.java:
##########
@@ -89,7 +89,7 @@ public class AuthenticationProviderOpenID implements 
AuthenticationProvider {
     private static final String SIMPLE_NAME = 
AuthenticationProviderOpenID.class.getSimpleName();
 
     // Must match the value used by the OAuth2 Client Plugin.
-    private static final String AUTH_METHOD_NAME = "token";
+    private static final String AUTH_METHOD_NAME = "openid";

Review Comment:
   This needs to be `token` in order to support the 
`AuthenticationProviderList`. Note that the oauth2 client plugin uses `token` 
as well. Also, it is valid to use the token authentication data provider in 
cases where the oauth2 token is fetched for you, like the k8s service account 
token.



-- 
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: commits-unsubscr...@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to