showuon commented on code in PR #15280:
URL: https://github.com/apache/kafka/pull/15280#discussion_r1469530712


##########
clients/src/main/java/org/apache/kafka/common/security/oauthbearer/internals/OAuthBearerSaslServer.java:
##########
@@ -159,10 +159,15 @@ private byte[] process(String tokenValue, String 
authorizationId, SaslExtensions
         }
         OAuthBearerToken token = callback.token();
         if (token == null) {
-            errorMessage = jsonErrorResponse(callback.errorStatus(), 
callback.errorScope(),
+            String returnedMessage = jsonErrorResponse(callback.errorStatus(), 
callback.errorScope(),
                     callback.errorOpenIDConfiguration());
+            if (!authorizationId.isEmpty()) {
+                errorMessage = String.format("The authorizationId {%s}: %s", 
authorizationId, returnedMessage);
+            } else {
+                errorMessage = returnedMessage;
+            }

Review Comment:
   The `returnedMessage` is the standard json data for response. The 
`errorMessage` is the message to throw in exception, so adding authorizationId 
is provided.



-- 
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: jira-unsubscr...@kafka.apache.org

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

Reply via email to