/** * Override this to perform extra error processing. Headers will have already been set on the * response. * * @param req * the current http request for this filter * @param resp * the current http response for this filter * @param iae * the exception that caused the error path * @throws IOException */ protected void onError(HttpServletRequest req, HttpServletResponse resp, AuthenticationHandler.InvalidAuthenticationException iae) throws IOException { Throwable cause = iae.getCause(); // For now append the cause message if set, this allows us to send any underlying oauth errors String message = (cause == null) ? iae.getMessage() : iae.getMessage() + cause.getMessage(); resp.sendError(HttpServletResponse.SC_UNAUTHORIZED, message); }
/** * Override this to perform extra error processing. Headers will have already been set on the * response. * * @param req * the current http request for this filter * @param resp * the current http response for this filter * @param iae * the exception that caused the error path * @throws IOException */ protected void onError(HttpServletRequest req, HttpServletResponse resp, AuthenticationHandler.InvalidAuthenticationException iae) throws IOException { Throwable cause = iae.getCause(); // For now append the cause message if set, this allows us to send any underlying oauth errors String message = (cause == null) ? iae.getMessage() : iae.getMessage() + cause.getMessage(); resp.sendError(HttpServletResponse.SC_UNAUTHORIZED, message); }
/** * Override this to perform extra error processing. Headers will have already been set on the * response. * * @param req * the current http request for this filter * @param resp * the current http response for this filter * @param iae * the exception that caused the error path * @throws IOException */ protected void onError(HttpServletRequest req, HttpServletResponse resp, AuthenticationHandler.InvalidAuthenticationException iae) throws IOException { Throwable cause = iae.getCause(); // For now append the cause message if set, this allows us to send any underlying oauth errors String message = (cause == null) ? iae.getMessage() : iae.getMessage() + cause.getMessage(); resp.sendError(HttpServletResponse.SC_UNAUTHORIZED, message); }
} catch (AuthenticationHandler.InvalidAuthenticationException iae) { Throwable cause = iae.getCause(); LOG.log(Level.INFO, iae.getMessage(), cause); } else { String message = (cause==null) ? iae.getMessage() : iae.getMessage() + cause.getMessage();
} catch (AuthenticationHandler.InvalidAuthenticationException iae) { Throwable cause = iae.getCause(); LOG.log(Level.INFO, iae.getMessage(), cause); } else { String message = (cause==null) ? iae.getMessage() : iae.getMessage() + cause.getMessage();