01: package org.manentia.kasai.services;
02:
03: import gs.scribblin.sysauth.SysAuth;
04:
05: import org.manentia.kasai.exceptions.InvalidPasswordException;
06: import org.manentia.kasai.exceptions.ServiceException;
07:
08: /**
09: *
10: * @author rzuasti
11: */
12: public class UnixAuthService implements AuthService {
13:
14: public int checkPassword(String userName, String password)
15: throws ServiceException {
16: int result = AUTH_BAD_USERNAME;
17:
18: if (SysAuth.isAllowed(userName, password)) {
19: result = AUTH_OK;
20: }
21:
22: return result;
23: }
24:
25: public void changePassword(String userName, String oldPassword,
26: String newPassword) throws ServiceException {
27:
28: }
29:
30: public void setPassword(String userName, String password)
31: throws ServiceException, InvalidPasswordException {
32:
33: // NOT SUPPORTED YET
34: }
35:
36: public String resetPassword(String userName)
37: throws ServiceException {
38: return null;
39: }
40:
41: public native boolean validUser(String strUser, String strPass);
42: }
|