Revision 212
Added by bojilova over 24 years ago
src/edu/ucsb/nceas/metacat/MetaCatSession.java | ||
---|---|---|
30 | 30 |
// JNI (Java Native Interface) routines for SRB |
31 | 31 |
static String srbHost; |
32 | 32 |
static String srbPort; |
33 |
// temporary need to read user & password from srbProps.properties |
|
34 |
static String srbUser; |
|
35 |
static String srbPass; |
|
36 | 33 |
static SrbJavaGlueInterface srbJG; |
37 | 34 |
static { |
38 | 35 |
try { |
... | ... | |
44 | 41 |
in.close(); |
45 | 42 |
srbHost = (String)SRBProps.get("host"); |
46 | 43 |
srbPort = (String)SRBProps.get("port"); |
47 |
// temporally reading user & password from srbProps.properties |
|
48 |
// for existing MCAT account like higgins/neetar |
|
49 |
srbUser = (String)SRBProps.get("user"); |
|
50 |
srbPass = (String)SRBProps.get("password"); |
|
51 | 44 |
// should handle missing RMIhost name here |
52 | 45 |
String RMIhost = (String)SRBProps.get("RMIhost"); |
53 | 46 |
String name = "//" + RMIhost + "/SrbJavaGlue"; |
... | ... | |
90 | 83 |
return sess; |
91 | 84 |
} |
92 | 85 | |
93 |
/** Try to make user authentication through SRB Connection */ |
|
86 |
/** Try to make user authentication through SRB RMI Connection */
|
|
94 | 87 |
public boolean userAuth(String password) |
95 | 88 |
throws RemoteException { |
96 | 89 |
int srbconn = 0; |
97 | 90 |
int err; |
98 | 91 |
|
99 |
// try SRB Connection |
|
100 |
// password should be used, not srbPass read from srbProps |
|
92 |
// try SRB RMI Connection |
|
101 | 93 |
// integer value of the SBR Connection ID is returned only |
102 | 94 |
try { |
103 |
srbconn = srbJG.clConnectJ( srbHost, srbPort, srbPass );
|
|
95 |
srbconn = srbJG.clConnectJ( srbHost, srbPort, password );
|
|
104 | 96 |
} catch (RemoteException e) { |
105 | 97 |
throw new RemoteException("MetaCatSession.userAuth() - " + |
106 | 98 |
"Error on clConnectJ(): " + e.getMessage()); |
Also available in: Unified diff
changed to use username/password entered on login