throwAccessDenied("Bad client id or password");
}
}
private void throwAccessDenied(String msg) throws OAuth2Exception {
OAuth2NormalizedResponse resp = new OAuth2NormalizedResponse();
resp.setError(ErrorType.ACCESS_DENIED.toString());
resp.setErrorDescription(msg);
resp.setStatus(HttpServletResponse.SC_FORBIDDEN);
throw new OAuth2Exception(resp);
}