klcodanr commented on code in PR #15:
URL: 
https://github.com/apache/sling-org-apache-sling-auth-core/pull/15#discussion_r1709679110


##########
src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java:
##########
@@ -663,7 +663,7 @@ private AuthenticationInfo 
getAuthenticationInfo(HttpServletRequest request, Htt
                     if (holder.isPathRequiresHandler(path)){
                         final AuthenticationInfo authInfo = 
holder.extractCredentials(
                             request, response);
-
+                            log.debug("getAuthenticationInfo: Selected class 
{} to perform authentication", holder.getHandler().getClass().getName());

Review Comment:
   Based on the EngineAuthenticationHandlerHolder there are cases where this 
could be null, which should be handled. How about:
   ```suggestion
                               log.debug("getAuthenticationInfo: Selected class 
{} to perform authentication", Optional.ofNullable(holder.getHandler()).map(h 
-> h.getClass().getName()).orElse("null"));
   ```



##########
src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java:
##########
@@ -672,9 +672,10 @@ private AuthenticationInfo 
getAuthenticationInfo(HttpServletRequest request, Htt
                                 authInfo.put(AUTH_INFO_PROP_FEEDBACK_HANDLER,
                                     holder.getFeedbackHandler());
                             }
-
+                            log.debug("getAuthenticationInfo: Selected class 
{} returned non null result returning as authenticated result {}", 
holder.getHandler().getClass().getName(), authInfo);

Review Comment:
   Same issue as above.



-- 
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]

Reply via email to