Subversion Repositories SmartDukaan

Rev

Rev 6788 | Blame | Compare with Previous | Last modification | View Log | RSS feed

package in.shop2020.catalog.dashboard.server;

import in.shop2020.catalog.dashboard.client.LoginService;
import in.shop2020.model.v1.catalog.CatalogService;
import in.shop2020.model.v1.user.UserContextService.increaseTrustLevel_args;
import in.shop2020.thrift.clients.CatalogClient;
import in.shop2020.thrift.clients.HelperClient;
import in.shop2020.utils.CatalogDashboardUser;

import com.google.gwt.user.server.rpc.RemoteServiceServlet;

@SuppressWarnings("serial")
public class LoginServiceImpl extends RemoteServiceServlet implements LoginService {

    @Override
    public String authenticateUser(String username, String password) {
        
        try {
            HelperClient hsc = new HelperClient();
            in.shop2020.utils.HelperService.Client hClient = hsc.getClient();
            CatalogDashboardUser catalogUser = hClient.authenticateCatalogUser(username, password);
            return catalogUser.getRole() + "";
        } catch (Exception ex) {
            ex.printStackTrace();
        }
        return null;
        
        
    }

}