Subversion Repositories SmartDukaan

Rev

Rev 3129 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3129 Rev 6788
Line 8... Line 8...
8
 
8
 
9
@SuppressWarnings("serial")
9
@SuppressWarnings("serial")
10
public class LoginServiceImpl extends RemoteServiceServlet implements LoginService {
10
public class LoginServiceImpl extends RemoteServiceServlet implements LoginService {
11
 
11
 
12
    @Override
12
    @Override
13
    public String authenticateUser(String username, String password, int role) {
13
    public String authenticateUser(String username, String password) {
14
        try {
14
        try {
15
            HelperClient hsc = new HelperClient();
15
            HelperClient hsc = new HelperClient();
16
            in.shop2020.utils.HelperService.Client hClient = hsc.getClient();
16
            in.shop2020.utils.HelperService.Client hClient = hsc.getClient();
17
            CatalogDashboardUser catalogUser = hClient.authenticateCatalogUser(username, password, role);
17
            CatalogDashboardUser catalogUser = hClient.authenticateCatalogUser(username, password);
18
            return catalogUser.getUsername();
18
            return catalogUser.getRole() + "";
19
        } catch (Exception ex) {
19
        } catch (Exception ex) {
20
            ex.printStackTrace();
20
            ex.printStackTrace();
21
        }
21
        }
22
        return null;
22
        return null;
23
    }
23
    }