Subversion Repositories SmartDukaan

Rev

Rev 3129 | 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
6788 rajveer 13
    public String authenticateUser(String username, String password) {
1961 ankur.sing 14
        try {
3129 rajveer 15
            HelperClient hsc = new HelperClient();
1961 ankur.sing 16
            in.shop2020.utils.HelperService.Client hClient = hsc.getClient();
6788 rajveer 17
            CatalogDashboardUser catalogUser = hClient.authenticateCatalogUser(username, password);
18
            return catalogUser.getRole() + "";
1961 ankur.sing 19
        } catch (Exception ex) {
20
            ex.printStackTrace();
21
        }
2027 ankur.sing 22
        return null;
1961 ankur.sing 23
    }
24
 
25
}