Compare commits
1 Commits
main
...
doc_how_we
Author | SHA1 | Date |
---|---|---|
YuCheng Hu | ccf227868b |
4
pom.xml
4
pom.xml
|
@ -16,7 +16,7 @@
|
||||||
<junit.version>5.7.0</junit.version>
|
<junit.version>5.7.0</junit.version>
|
||||||
<javax.version>2.5</javax.version>
|
<javax.version>2.5</javax.version>
|
||||||
<odata.version>4.8.0</odata.version>
|
<odata.version>4.8.0</odata.version>
|
||||||
<slf4j.version>1.7.7</slf4j.version>
|
<slf4j.version>2.0.7</slf4j.version>
|
||||||
</properties>
|
</properties>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>mysql</groupId>
|
<groupId>mysql</groupId>
|
||||||
<artifactId>mysql-connector-java</artifactId>
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
<version>8.0.23</version>
|
<version>8.0.33</version>
|
||||||
<scope>runtime</scope>
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
|
@ -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 BasicAuthProvider()); // We're using this for the token auth. Only use here for easy browser testing.
|
||||||
this.validator.addProvider(new BearerAuthProvider());
|
this.validator.addProvider(new BearerAuthProvider());
|
||||||
|
|
||||||
String dbHost = env.get("SQL_HOST");
|
String dbHost = "localhost";
|
||||||
String dbUser = env.get("SQL_USER");
|
String dbUser ="root";
|
||||||
String dbPwd = env.get("SQL_PASSWORD");
|
String dbPwd = "root";
|
||||||
String dbConnString = env.get("SQL_CONNECTION_STR");
|
String dbConnString = "jdbc:mysql://localhost:6033/reso_data_dictionary_1_7?autoReconnect=true&maxReconnects=4";
|
||||||
String dbDriverStr = env.get("SQL_DB_DRIVER");
|
String dbDriverStr = "com.mysql.cj.jdbc.Driver";
|
||||||
|
|
||||||
|
|
||||||
String definitionFile = env.get("CERT_REPORT_FILENAME");
|
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 {
|
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.
|
// 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))
|
// if (!this.validator.verify(req) && this.validator.unauthorizedResponse(resp))
|
||||||
{
|
// {
|
||||||
SimpleError error = new SimpleError(SimpleError.AUTH_REQUIRED);
|
// SimpleError error = new SimpleError(SimpleError.AUTH_REQUIRED);
|
||||||
ObjectMapper objectMapper = new ObjectMapper();
|
// ObjectMapper objectMapper = new ObjectMapper();
|
||||||
|
//
|
||||||
PrintWriter out = resp.getWriter();
|
// PrintWriter out = resp.getWriter();
|
||||||
out.println(objectMapper.writeValueAsString(error));
|
// out.println(objectMapper.writeValueAsString(error));
|
||||||
out.flush();
|
// out.flush();
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
try {
|
try {
|
||||||
this.handler.process(req, resp);
|
this.handler.process(req, resp);
|
||||||
|
|
Loading…
Reference in New Issue