Changeset 32944 for main/trunk
- Timestamp:
- 2019-04-01T12:38:16+13:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/Authentication.java
r32451 r32944 46 46 47 47 //Error codes 48 p rotectedstatic final int NO_ERROR = 0;48 public static final int NO_ERROR = 0; 49 49 protected static final int ERROR_NOT_LOGGED_IN = -1; 50 50 protected static final int ERROR_ADMIN_NOT_LOGGED_IN = -2; … … 143 143 protected static final String LOGIN = "Login"; 144 144 protected static final String BLANK = "Info"; // a dummy page just for showing an error message 145 145 146 //the services on offer 146 p rotectedstatic final String AUTHENTICATION_SERVICE = "Authentication";147 public static final String AUTHENTICATION_SERVICE = "Authentication"; 147 148 protected static final String GET_USER_INFORMATION_SERVICE = "GetUserInformation"; 148 149 protected static final String CHANGE_USER_EDIT_MODE_SERVICE = "ChangeUserEditMode"; … … 150 151 151 152 protected static boolean _derbyWrapperDoneForcedShutdown = false; 152 153 153 154 // some XML strings 154 155 protected static final String RECAPTCHA_ELEM = "recaptcha"; … … 239 240 remoteAuthentication_service.setAttribute(GSXML.NAME_ATT, REMOTE_AUTHENTICATION_SERVICE); 240 241 this.short_service_info.appendChild(remoteAuthentication_service); 241 242 242 243 243 DerbyWrapper.createDatabaseIfNeeded(); … … 276 276 // check recaptcha 277 277 if (_recaptchaSecretKey == null || _recaptchaSecretKey.length() == 0 || _recaptchaSiteKey == null || _recaptchaSiteKey.length() == 0) { 278 _recaptchaSecretKey = null; 279 _recaptchaSiteKey = null; 278 280 _recaptchaOpList = null; 279 281 } … … 290 292 } 291 293 294 public String getRecaptchaSiteKey() { 295 return _recaptchaSiteKey; 296 } 297 298 public String getRecaptchaSecretKey() { 299 300 return _recaptchaSecretKey; 301 } 292 302 protected Element getServiceDescription(Document doc, String service_id, String lang, String subset) 293 303 { … … 346 356 347 357 } 358 public static String getErrorKey(int error_code) { 359 360 return _errorKeyMap.get(error_code); 361 } 348 362 protected Element processChangeUserEditMode(Element request) 349 363 { … … 978 992 } 979 993 980 public int verifyRecaptcha(String secret_key, String user_response) {994 public static int verifyRecaptcha(String secret_key, String user_response) { 981 995 982 996 if (user_response == null || user_response.length() == 0) {
Note:
See TracChangeset
for help on using the changeset viewer.