Compare commits

...

1 Commits

Author SHA1 Message Date
YuCheng Hu ccf227868b Update the version of package 2023-09-01 14:16:06 -04:00
2 changed files with 17 additions and 17 deletions

View File

@ -16,7 +16,7 @@
<junit.version>5.7.0</junit.version>
<javax.version>2.5</javax.version>
<odata.version>4.8.0</odata.version>
<slf4j.version>1.7.7</slf4j.version>
<slf4j.version>2.0.7</slf4j.version>
</properties>
<dependencies>
<dependency>
@ -29,7 +29,7 @@
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.23</version>
<version>8.0.33</version>
<scope>runtime</scope>
</dependency>

View File

@ -63,11 +63,11 @@ public class RESOservlet extends HttpServlet
// this.validator.addProvider(new BasicAuthProvider()); // We're using this for the token auth. Only use here for easy browser testing.
this.validator.addProvider(new BearerAuthProvider());
String dbHost = env.get("SQL_HOST");
String dbUser = env.get("SQL_USER");
String dbPwd = env.get("SQL_PASSWORD");
String dbConnString = env.get("SQL_CONNECTION_STR");
String dbDriverStr = env.get("SQL_DB_DRIVER");
String dbHost = "localhost";
String dbUser ="root";
String dbPwd = "root";
String dbConnString = "jdbc:mysql://localhost:6033/reso_data_dictionary_1_7?autoReconnect=true&maxReconnects=4";
String dbDriverStr = "com.mysql.cj.jdbc.Driver";
String definitionFile = env.get("CERT_REPORT_FILENAME");
@ -220,16 +220,16 @@ public class RESOservlet extends HttpServlet
protected void service(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {
// Due to order of operations, the unauthorized response won't be called unless the verification fails.
if (!this.validator.verify(req) && this.validator.unauthorizedResponse(resp))
{
SimpleError error = new SimpleError(SimpleError.AUTH_REQUIRED);
ObjectMapper objectMapper = new ObjectMapper();
PrintWriter out = resp.getWriter();
out.println(objectMapper.writeValueAsString(error));
out.flush();
return;
}
// if (!this.validator.verify(req) && this.validator.unauthorizedResponse(resp))
// {
// SimpleError error = new SimpleError(SimpleError.AUTH_REQUIRED);
// ObjectMapper objectMapper = new ObjectMapper();
//
// PrintWriter out = resp.getWriter();
// out.println(objectMapper.writeValueAsString(error));
// out.flush();
// return;
// }
try {
this.handler.process(req, resp);