Örnek
Şöyle yaparız.
Şöyle yaparız.
@Component
public class CustomAuthenticationFailureHandler implements AuthenticationFailureHandler
{
  @Override
  public void onAuthenticationFailure(HttpServletRequest request,
                                      HttpServletResponse response,
      AuthenticationException ex) throws IOException, ServletException
  {
    response.setStatus(HttpStatus.UNAUTHORIZED.value());
    ...
  }
} 
Hiç yorum yok:
Yorum Gönder