|
|
@ -46,9 +46,7 @@ public class JWTAuthenticationProvider implements AuthenticationProvider { |
|
|
|
// TODO:AD This is super unfortunate, but not sure there is a better way when using JSP
|
|
|
|
// TODO:AD This is super unfortunate, but not sure there is a better way when using JSP
|
|
|
|
if(StringUtils.contains(authentication.getRequestedPath(), "/WEB-INF/jsp/")) { |
|
|
|
if(StringUtils.contains(authentication.getRequestedPath(), "/WEB-INF/jsp/")) { |
|
|
|
logger.warn("BYPASSING AUTH FOR WEB-INF page"); |
|
|
|
logger.warn("BYPASSING AUTH FOR WEB-INF page"); |
|
|
|
} else |
|
|
|
} else if(!roughlyEqual(path.asString(), authentication.getRequestedPath())) { |
|
|
|
|
|
|
|
|
|
|
|
if(!roughlyEqual(path.asString(), authentication.getRequestedPath())) { |
|
|
|
|
|
|
|
throw new InsufficientAuthenticationException("Credentials not valid for path " + authentication |
|
|
|
throw new InsufficientAuthenticationException("Credentials not valid for path " + authentication |
|
|
|
.getRequestedPath() + ". They are valid for " + path.asString()); |
|
|
|
.getRequestedPath() + ". They are valid for " + path.asString()); |
|
|
|
} |
|
|
|
} |
|
|
|