You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2020/10/01 18:52:46 UTC

[GitHub] [incubator-pinot] suvodeep-pyne commented on a change in pull request #6085: [TE] Refactor. ThirdEyePrincipal should be immutable

suvodeep-pyne commented on a change in pull request #6085:
URL: https://github.com/apache/incubator-pinot/pull/6085#discussion_r498450455



##########
File path: thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/auth/ThirdEyeAuthFilter.java
##########
@@ -109,7 +108,7 @@ public void filter(ContainerRequestContext requestContext) {
     }
   }
 
-  private boolean isAuthenticated(ContainerRequestContext containerRequestContext, ThirdEyePrincipal principal) {
+  private ThirdEyePrincipal getPrincipal(ContainerRequestContext containerRequestContext) {

Review comment:
       I know. I tried that initially. However, the way things are written, I would have had to do a bunch of `optional.get()` which defeats the purpose. The other option is to rewrite the logic to make it more optional friendly, but didn't want to do that in this PR.




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org