Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

592 update login references #671

Merged
merged 5 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,6 @@
<version>1.13.0</version>
</dependency>

<dependency>
<groupId>org.pac4j</groupId>
<artifactId>pac4j-oauth</artifactId>
<version>1.9.7</version>
</dependency>

<dependency>
<groupId>org.scribe</groupId>
Expand Down
57 changes: 0 additions & 57 deletions src/main/java/org/ecocean/security/SocialAuth.java

This file was deleted.

8 changes: 1 addition & 7 deletions src/main/java/org/ecocean/servlet/JavascriptGlobals.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import com.google.gson.Gson;
import org.ecocean.CommonConfiguration;
import org.ecocean.identity.IBEISIA;
import org.ecocean.security.SocialAuth;


public class JavascriptGlobals extends HttpServlet {
public void init(ServletConfig config)
Expand Down Expand Up @@ -100,12 +100,6 @@ public void doPost(HttpServletRequest request, HttpServletResponse response)
rtn.put("classDefinitions", classDefn);

// TODO we could do this for all sorts of property files too?
Properties authprops = SocialAuth.authProps(context);
if (authprops != null) {
for (String pn : authprops.stringPropertyNames()) {
propvalToHashMap(pn, authprops.getProperty(pn), rtn);
}
}
HashMap uploader = new HashMap();
String s3key = CommonConfiguration.getProperty("s3upload_accessKeyId", context);
if (s3key == null) {
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/ecocean/servlet/LoginUser.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
/**
* Uses JSecurity to authenticate a user If user can be authenticated successfully forwards user to /welcome.jsp
*
* If user cannot be authenticated then forwards user to the /login.jsp which will display an error message
* If user cannot be authenticated then forwards user to the /react/login which will display an error message
*/
public class LoginUser extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet {
static final long serialVersionUID = 1L;
Expand All @@ -35,15 +35,15 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response)

protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
String url = "/login.jsp";
String url = "/react/login";

System.out.println("Starting LoginUser servlet...");

// String urlLoc = "//" + CommonConfiguration.getURLLocation(request);
// if(!urlLoc.contains("localhost")) {urlLoc="https:"+urlLoc;System.out.println("HTTPS!");}
// else {urlLoc="http:"+urlLoc;}

// see /login.jsp for these form fields
// see /react/login for these form fields
String username = request.getParameter("username").trim();
String password = request.getParameter("password").trim();
String salt = "";
Expand Down
259 changes: 0 additions & 259 deletions src/main/java/org/ecocean/servlet/LoginUserSocial.java

This file was deleted.

Loading
Loading