Add authentication to config servlet
This commit is contained in:
parent
e1fb29b7c8
commit
1b75340f74
|
@ -36,6 +36,18 @@ public class ConfigServlet extends AbstractCtbrecServlet {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
|
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
|
||||||
|
// try {
|
||||||
|
// boolean authenticated = checkAuthentication(req, body(req));
|
||||||
|
// if (!authenticated) {
|
||||||
|
// resp.setStatus(SC_UNAUTHORIZED);
|
||||||
|
// String response = "{\"status\": \"error\", \"msg\": \"HMAC does not match\"}";
|
||||||
|
// resp.getWriter().write(response);
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
// } catch (InvalidKeyException | NoSuchAlgorithmException | IllegalStateException e) {
|
||||||
|
// throw new ServletException(e);
|
||||||
|
// }
|
||||||
|
|
||||||
resp.setStatus(SC_OK);
|
resp.setStatus(SC_OK);
|
||||||
resp.setContentType("application/json");
|
resp.setContentType("application/json");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue