Project

General

Profile

« Previous | Next » 

Revision 2171

Added by Duane Costa over 20 years ago

Store session attributes as username and password for consistency with Metacat

View differences:

src/edu/ucsb/nceas/metacat/harvesterClient/HarvesterRegistrationLogin.java
115 115

  
116 116
          if (isValid) {
117 117
            httpSession = req.getSession(true);
118
            httpSession.setAttribute("ldapDN", user);
119
            httpSession.setAttribute("ldapPwd", passwd);
118
            httpSession.setAttribute("username", user);
119
            httpSession.setAttribute("password", passwd);
120 120
            res.sendRedirect(
121 121
             "edu.ucsb.nceas.metacat.harvesterClient.HarvesterRegistration");
122 122
          }
src/edu/ucsb/nceas/metacat/harvesterClient/MetUpload.java
81 81
    MultipartParser parser = new MultipartParser(req, 1024 * 1024);
82 82
    ParamPart       pPart;
83 83
    HttpSession     sess = req.getSession(true);
84
    String          password = (String) sess.getAttribute("Mpassword");
84
    String          password = (String) sess.getAttribute("password");
85 85
    StringReader    sr = null;
86 86
    boolean         upload = false;
87
    String          username = (String) sess.getAttribute("Musername");
87
    String          username = (String) sess.getAttribute("username");
88 88
    
89 89
    res.setContentType("text/plain");
90 90

  
src/edu/ucsb/nceas/metacat/harvesterClient/LoginServlet.java
105 105
    if (isValid) {
106 106
      System.out.println(authSession.getMessage());
107 107
      httpSession = request.getSession(true);
108
      httpSession.putValue("Musername", user);
109
      httpSession.putValue("Mpassword", passwd);
108
      httpSession.setAttribute("username", user);
109
      httpSession.setAttribute("password", passwd);
110 110
      response.sendRedirect("../style/skins/dev/harvesterUpload.html");
111 111
    }
112 112
    else {
src/edu/ucsb/nceas/metacat/harvesterClient/HarvesterRegistration.java
377 377

  
378 378
    // The user name and password are stored as session attributes by the
379 379
    // HarvesterRegistrationLogin servlet.
380
    ldapDN = (String) httpSession.getAttribute("ldapDN");
381
    ldapPwd = (String) httpSession.getAttribute("ldapPwd");
380
    ldapDN = (String) httpSession.getAttribute("username");
381
    ldapPwd = (String) httpSession.getAttribute("password");
382 382

  
383 383
    siteScheduleID = getSiteScheduleID(conn, ldapDN);
384 384

  
......
522 522

  
523 523
    // The user name and password are stored as session attributes by the
524 524
    // HarvesterRegistrationLogin servlet
525
    ldapDN = (String) httpSession.getAttribute("ldapDN");
526
    ldapPwd = (String) httpSession.getAttribute("ldapPwd");
525
    ldapDN = (String) httpSession.getAttribute("username");
526
    ldapPwd = (String) httpSession.getAttribute("password");
527 527

  
528 528
    contactEmail = parameterParser.getStringParameter("contactEmail", "None");
529 529
    documentListURL = parameterParser.getStringParameter("documentListURL", "");
......
703 703
	
704 704
			while (rs.next()) {
705 705
        ldapDNValue = rs.getString("LDAPDN");
706

  
706
        
707 707
        if (ldapDNValue.equalsIgnoreCase(ldapDN)) {
708 708
				  siteScheduleID = rs.getInt("SITE_SCHEDULE_ID");
709 709
        }

Also available in: Unified diff