Subversion Repositories SmartDukaan

Rev

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

Rev 2027 Rev 2359
Line 7... Line 7...
7
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
7
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
8
 
8
 
9
public class LoginServiceImpl extends RemoteServiceServlet implements LoginService {
9
public class LoginServiceImpl extends RemoteServiceServlet implements LoginService {
10
 
10
 
11
    @Override
11
    @Override
12
    public String authenticateUser(String username, String password) {
12
    public String authenticateUser(String username, String password, int role) {
13
        try {
13
        try {
14
            HelperServiceClient hsc = new HelperServiceClient();
14
            HelperServiceClient hsc = new HelperServiceClient();
15
            in.shop2020.utils.HelperService.Client hClient = hsc.getClient();
15
            in.shop2020.utils.HelperService.Client hClient = hsc.getClient();
16
            CatalogDashboardUser catalogUser = hClient.authenticateCatalogUser(username, password);
16
            CatalogDashboardUser catalogUser = hClient.authenticateCatalogUser(username, password, role);
17
            return catalogUser.getUsername();
17
            return catalogUser.getUsername();
18
        } catch (Exception ex) {
18
        } catch (Exception ex) {
19
            ex.printStackTrace();
19
            ex.printStackTrace();
20
        }
20
        }
21
        return null;
21
        return null;