Commit 6926a09f authored by Sascha Herzinger's avatar Sascha Herzinger
Browse files

added null check to interceptor

parent e19415a4
......@@ -35,6 +35,9 @@ public class RefreshAuthoritiesInterceptor implements HandlerInterceptor {
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
Authentication auth = SecurityContextHolder.getContext().getAuthentication();
if (auth == null) {
return true;
}
Authentication newAuth = new UsernamePasswordAuthenticationToken(
auth.getPrincipal(),
auth.getCredentials(),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment