title: Spring-boot BASIC Authentication not working in IE browser
body: <p>I have done basic authentication using springboot with BasicAuthenticationEntryPoint and custom filter. It working as expected in Chrome but not working in IE browser.</p>
  
  <p>First its prompting login page if entered wrong credentials then if we reload the page and its trying to authenticate with previous details only and not prompting login page again in IE browser but this same was working in chrome as expected.</p>
  
  <p>Code as below:</p>
  
  <pre><code>@Override
      protected void configure(HttpSecurity http) throws Exception {
  
  
          http.csrf().disable().authorizeRequests().anyRequest().fullyAuthenticated().and().httpBasic()
                  .authenticationEntryPoint(new MyBasicAuthenticationEntryPoint());
  
          http.addFilterAt(getCustomAuthenticationFilter(), BasicAuthenticationFilter.class);
  
          http.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS);
      }
  </code></pre>
  
  <p>BasicAuthenticationEntryPoint code:</p>
  
  <pre><code>public class MyBasicAuthenticationEntryPoint extends BasicAuthenticationEntryPoint {
  
      @Override
      public void commence(HttpServletRequest request, HttpServletResponse response,
              org.springframework.security.core.AuthenticationException authException)
              throws IOException, ServletException {
  
          response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
          response.setHeader("WWW-Authenticate", "Basic");
          response.getOutputStream().println(authException.getMessage());
  
      }
  
      @Override
      public void afterPropertiesSet() throws Exception {
  
          setRealmName("localhost");
          super.afterPropertiesSet();
      }
  
  }
  </code></pre>
  
  <p>CustomFilter Code:</p>
  
  <pre><code>public class CustomAuthenticationFilter extends BasicAuthenticationFilter {
  
    @Autowired
    AuthUsersService authUsersService;
  
    @Autowired
    public CustomAuthenticationFilter(AuthenticationManager authenticationManager) {
  
      super(authenticationManager);
    }
  
    @Override
    protected void onSuccessfulAuthentication(HttpServletRequest request, HttpServletResponse response,
        Authentication authResult) throws IOException {
  
         System.out.println("Successful");
  
      return;
  
    }
  
  
    @Override
    protected void onUnsuccessfulAuthentication(HttpServletRequest request, HttpServletResponse response,
        AuthenticationException failed) throws IOException {
  
      System.out.println("UN-Successful");
  
      return;
  
    }  
  
  }
  </code></pre>
  
  <p>Can anyone please suggest on this why above code not working on IE browser ?</p>