I am using undertow server, undertow servlet 2.2.9.FINAL
The code is to authenticate Rest Api Endpoints and Servlet Endpoint
how to fix this Issue?
I am not getting any error in dev and UAT environment, but getting error in production environment intermittently.
@Override protected void configure(HttpSecurity http) throws Exception { // Configure
security for servlet endpoints
http
.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).and(). .authorizeRequests() .antMatchers("/api/**").authenticated() .antMatchers("/servlet-endpoint/**").authenticated() .anyRequest().permitAll().and() .addFilterBefore(customFilter,SecurityContextHolderAwareRequestFilter).csrf().disabled();
}
Error
java.lang.IllegalStateException : Session is invalid -YDJDFSBSDNFSJVSHGSGNS InMemorySessionManager. ..undertow-core 2.2.17.FINAl.jar SavedRequest.java ........undertow-servlet CacheAuthenticatedSessionHandler.java