Fix filter set Authentication
This commit is contained in:
parent
db66b6f91e
commit
ed48bb0c6d
|
@ -27,7 +27,7 @@ public class AuthorizationFilter implements Filter {
|
|||
@Override
|
||||
public void doFilter(ServletRequest req, ServletResponse res, FilterChain filterChain) throws IOException, ServletException {
|
||||
OpenAIREAuthentication auth = authorizationProvider.getAuthentication((HttpServletRequest) req);
|
||||
if(auth != null) {
|
||||
if(auth.isAuthenticated()) {
|
||||
SecurityContextHolder.getContext().setAuthentication(auth);
|
||||
}
|
||||
filterChain.doFilter(req, res);
|
||||
|
|
Loading…
Reference in New Issue