01: package org.manentia.kasai.services;
02:
03: import org.manentia.kasai.exceptions.InvalidPasswordException;
04: import org.manentia.kasai.exceptions.ServiceException;
05:
06: /**
07: *
08: * @author rzuasti
09: */
10: public interface AuthService {
11:
12: public static final int AUTH_OK = 0;
13: public static final int AUTH_BAD_USERNAME = 1;
14: public static final int AUTH_BAD_PASSWORD = 2;
15:
16: public int checkPassword(String userName, String password)
17: throws ServiceException;
18:
19: public void changePassword(String userName, String oldPassword,
20: String newPassword) throws ServiceException,
21: InvalidPasswordException;
22:
23: public String resetPassword(String userName)
24: throws ServiceException;
25:
26: public void setPassword(String userName, String password)
27: throws ServiceException, InvalidPasswordException;
28: }
|