Project

General

Profile

« Previous | Next » 

Revision 2166

Added by Duane Costa over 20 years ago

Improve Harvester registration login

View differences:

lib/style/skins/knb/harvesterRegistrationLogin.html
24 24
        <tr > 
25 25
          <td colspan=3 align=center >
26 26
            <font face=verdana size=1%>
27
              <b>Please  Enter Username and Password. </b>
27
              <b>Please  Enter Username, Organization, and Password</b>
28 28
            </font>
29 29
          </td> 
30 30
        </tr>
......
36 36
            <b>Username</b>
37 37
            </font>
38 38
          </td>
39
          <td><p><input type="text" name="user" maxlength="100" size="28"></td>
39
          <td><p><input type="text" name="uid" maxlength="100" size="28"></td>
40 40
        </tr>
41 41
        <tr>
42 42
          <td width='10%'> &nbsp;</td>
43
          <td width="25%" bgcolor="#4682b4">
44
            <p align="center">
45
            <font color="white" face=verdana size=2%>
46
            <b>Organization</b>
47
            </font>
48
          </td>
49
          <td>
50
            <input type="radio" name="o" value="NCEAS">NCEAS
51
            <input type="radio" name="o" value="LTER">LTER
52
            <input type="radio" name="o" value="NRS">NRS
53
            <br>
54
            <input type="radio" name="o" value="PISCO">PISCO
55
            <input type="radio" name="o" value="OBFS">OBFS
56
            <input type="radio" name="o" value="Unaffiliated">Unaffiliated
57
        </tr>
58
        <tr>
59
          <td width='10%'> &nbsp;</td>
43 60
          <td bgcolor="#4682b4">
44 61
            <p align="center">
45 62
            <font color="white" face=verdana size=2%>
src/edu/ucsb/nceas/metacat/harvesterClient/HarvesterRegistrationLogin.java
39 39
 */
40 40
public class HarvesterRegistrationLogin extends HttpServlet {
41 41

  
42
    final String LDAP_DOMAIN = ",dc=ecoinformatics,dc=org";
43

  
42 44
    /**
43 45
     *  Handle "GET" method requests from HTTP clients
44 46
     *
......
79 81
        String authSessionMessage;
80 82
        HttpSession httpSession;
81 83
        boolean isValid;
82
        String passwd = req.getParameter("passwd");;
84
        String o = req.getParameter("o");
85
        String organization;
86
        String passwd = req.getParameter("passwd");
83 87
        PrintWriter out = res.getWriter();
84
        String user = req.getParameter("user");
88
        String uid = req.getParameter("uid");
89
        String user;
85 90

  
91
        if ((uid == null) || (uid.equals(""))) {
92
          out.println("Invalid login: no Username specified.");
93
          return;
94
        }
95
        else if ((o == null) || (o.equals(""))) {
96
          out.println("Invalid login: no Organization selected.");
97
          return;
98
        }
99
        else if ((passwd == null) || (passwd.equals(""))) {
100
          out.println("Invalid login: no Password specified.");
101
          return;
102
        }
103
        else {
104
          user = "uid=" + uid + ",o=" + o + LDAP_DOMAIN;
105
        }
106

  
86 107
        res.setContentType("text/plain");
87 108
        
88 109
        try {
docs/user/harvester.html
323 323
  </p>
324 324
  <p>
325 325
  After bringing up this page in your browser, login to your Metacat account 
326
  by entering your username and password.
327
  The username should include the full LDAP specification, for example:
328
  <pre>
329
  Username:   uid=jdoe,o=lter,dc=ecoinformatics,dc=org
330
  Password:   *******
331
  </pre>
326
  by entering your username, organization, and password. For example:
327
      <table bgcolor="#ffffff" border="0" cellpadding="2" width='100%' >
328
        <tr > 
329
          <td colspan=3 align=center >&nbsp;</td> 
330
        </tr>
331
        <tr > 
332
          <td colspan=3 align=center >
333
            <font face=verdana size=1%>
334
              <b>Please  Enter Username, Organization, and Password </b>
335
            </font>
336
          </td> 
337
        </tr>
338
        <tr>
339
          <td width='10%'> &nbsp;</td>
340
          <td width="25%" bgcolor="#4682b4">
341
            <p align="center">
342
            <font color="white" face=verdana size=2%>
343
            <b>Username</b>
344
            </font>
345
          </td>
346
          <td><p><input type="text" name="uid" value="jdoe" maxlength="100" size="28"></td>
347
        </tr>
348
        <tr>
349
          <td width='10%'> &nbsp;</td>
350
          <td width="25%" bgcolor="#4682b4">
351
            <p align="center">
352
            <font color="white" face=verdana size=2%>
353
            <b>Organization</b>
354
            </font>
355
          </td>
356
          <td>
357
            <input type="radio" name="o" value="NCEAS" checked>NCEAS
358
            <input type="radio" name="o" value="LTER">LTER
359
            <input type="radio" name="o" value="NRS">NRS
360
            <br>
361
            <input type="radio" name="o" value="PISCO">PISCO
362
            <input type="radio" name="o" value="OBFS">OBFS
363
            <input type="radio" name="o" value="Unaffiliated">Unaffiliated
364
        </tr>
365
        <tr>
366
          <td width='10%'> &nbsp;</td>
367
          <td bgcolor="#4682b4">
368
            <p align="center">
369
            <font color="white" face=verdana size=2%>
370
            <b>Password</b>
371
            </font>
372
          </td>
373
          <td><p><input type="password" name="passwd" value="*******" maxlength="60" size="28">
374
          </td>
375
        </tr>
376
        <tr> 
377
          <td colspan=3 align=center >&nbsp;</td>
378
        </tr>
379
      </table>
332 380
  In some cases, a Site Contact may need to login to an anonymous account
333 381
  rather than his or her personal account. For example, a LTER Information 
334 382
  Manager may need to login to a dedicated account, named with a three-letter 
335
  acronym, that has been set up for the LTER site. For example:
336
  <pre>
337
  Username:   uid=GCE,o=lter,dc=ecoinformatics,dc=org
338
  Password:   *******
339
  </pre>
340
  is the account login that would be used by the LTER Information Mangager
341
  at the GCE (Georgia Coastal Ecosystems) site.
383
  acronym, that has been set up for the LTER site. The username
384
  "GCE" would be used by the LTER Information Mangager at the GCE (Georgia 
385
  Coastal Ecosystems) site.
342 386
  </p>
343 387
    </li>
344 388
    <li>Registering with Harvester

Also available in: Unified diff