Subversion Repositories SmartDukaan

Rev

Rev 1962 | Rev 2359 | 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;
4
import in.shop2020.thrift.clients.HelperServiceClient;
2027 ankur.sing 5
import in.shop2020.utils.CatalogDashboardUser;
1961 ankur.sing 6
 
7
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
8
 
9
public class LoginServiceImpl extends RemoteServiceServlet implements LoginService {
10
 
11
    @Override
2027 ankur.sing 12
    public String authenticateUser(String username, String password) {
1961 ankur.sing 13
        try {
14
            HelperServiceClient hsc = new HelperServiceClient();
15
            in.shop2020.utils.HelperService.Client hClient = hsc.getClient();
2027 ankur.sing 16
            CatalogDashboardUser catalogUser = hClient.authenticateCatalogUser(username, password);
17
            return catalogUser.getUsername();
1961 ankur.sing 18
        } catch (Exception ex) {
19
            ex.printStackTrace();
20
        }
2027 ankur.sing 21
        return null;
1961 ankur.sing 22
    }
23
 
24
}