@Override protected void unsuccessfulAuthentication(HttpServletRequest request, HttpServletResponse response, AuthenticationException failed) throws IOException, ServletException { if (failed instanceof AccessTokenRequiredException) { // Need to force a redirect via the OAuth client filter, so rethrow here throw failed; } else { // If the exception is not a Spring Security exception this will result in a default error page super.unsuccessfulAuthentication(request, response, failed); } }
@Override protected void unsuccessfulAuthentication(HttpServletRequest request, HttpServletResponse response, AuthenticationException failed) throws IOException, ServletException { super.unsuccessfulAuthentication(request, response, failed); }
protected void unsuccessfulAuthentication(HttpServletRequest request, HttpServletResponse response, AuthenticationException failed) throws IOException, ServletException { if(failed instanceof AccessTokenRequiredException) { throw failed; } else { super.unsuccessfulAuthentication(request, response, failed); } }
@Override protected void unsuccessfulAuthentication(HttpServletRequest request, HttpServletResponse response, AuthenticationException failed) throws IOException, ServletException { if (failed instanceof AccessTokenRequiredException) { // Need to force a redirect via the OAuth client filter, so rethrow here throw failed; } else { // If the exception is not a Spring Security exception this will result in a default error page super.unsuccessfulAuthentication(request, response, failed); } }
"An internal error occurred while trying to authenticate the user.", failed); unsuccessfulAuthentication(request, response, failed); unsuccessfulAuthentication(request, response, failed);