Subversion Repositories SmartDukaan

Rev

Rev 2427 | Rev 6788 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1961 ankur.sing 1
package in.shop2020.catalog.dashboard.server;
2
 
3
import in.shop2020.catalog.dashboard.client.LoginService;
3129 rajveer 4
import in.shop2020.thrift.clients.HelperClient;
2027 ankur.sing 5
import in.shop2020.utils.CatalogDashboardUser;
1961 ankur.sing 6
 
7
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
8
 
2427 ankur.sing 9
@SuppressWarnings("serial")
1961 ankur.sing 10
public class LoginServiceImpl extends RemoteServiceServlet implements LoginService {
11
 
12
    @Override
2359 ankur.sing 13
    public String authenticateUser(String username, String password, int role) {
1961 ankur.sing 14
        try {
3129 rajveer 15
            HelperClient hsc = new HelperClient();
1961 ankur.sing 16
            in.shop2020.utils.HelperService.Client hClient = hsc.getClient();
2359 ankur.sing 17
            CatalogDashboardUser catalogUser = hClient.authenticateCatalogUser(username, password, role);
2027 ankur.sing 18
            return catalogUser.getUsername();
1961 ankur.sing 19
        } catch (Exception ex) {
20
            ex.printStackTrace();
21
        }
2027 ankur.sing 22
        return null;
1961 ankur.sing 23
    }
24
 
25
}