pzampino commented on a change in pull request #424:
URL: https://github.com/apache/knox/pull/424#discussion_r601762106
##########
File path:
gateway-provider-security-hadoopauth/src/main/java/org/apache/knox/gateway/hadoopauth/filter/HadoopAuthPostFilter.java
##########
@@ -78,7 +79,14 @@ public void doFilter(ServletRequest request, ServletResponse
response, FilterCha
Subject subject = null;
if (shouldUseJwtFilter(jwtFilter, (HttpServletRequest) request)) {
try {
- subject =
jwtFilter.createSubjectFromToken(jwtFilter.getWireToken(request));
+ Pair<JWTFederationFilter.TokenType, String> wireToken =
jwtFilter.getWireToken(request);
+ JWTFederationFilter.TokenType tokenType = wireToken.getLeft();
+ String token = wireToken.getRight();
+ if (JWTFederationFilter.TokenType.JWT.equals(tokenType)) {
+ subject = jwtFilter.createSubjectFromToken(token);
+ } else if (JWTFederationFilter.TokenType.Passcode.equals(tokenType)) {
Review comment:
I don't understand what you're suggesting here. Can you elaborate for me?
--
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:
[email protected]