Subversion Repositories SmartDukaan

Rev

Rev 6788 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6788 Rev 21864
Line 1... Line 1...
1
package in.shop2020.catalog.dashboard.server;
1
package in.shop2020.catalog.dashboard.server;
2
 
2
 
3
import in.shop2020.catalog.dashboard.client.LoginService;
3
import in.shop2020.catalog.dashboard.client.LoginService;
-
 
4
import in.shop2020.model.v1.catalog.CatalogService;
-
 
5
import in.shop2020.model.v1.user.UserContextService.increaseTrustLevel_args;
-
 
6
import in.shop2020.thrift.clients.CatalogClient;
4
import in.shop2020.thrift.clients.HelperClient;
7
import in.shop2020.thrift.clients.HelperClient;
5
import in.shop2020.utils.CatalogDashboardUser;
8
import in.shop2020.utils.CatalogDashboardUser;
6
 
9
 
7
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
10
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
8
 
11
 
9
@SuppressWarnings("serial")
12
@SuppressWarnings("serial")
10
public class LoginServiceImpl extends RemoteServiceServlet implements LoginService {
13
public class LoginServiceImpl extends RemoteServiceServlet implements LoginService {
11
 
14
 
12
    @Override
15
    @Override
13
    public String authenticateUser(String username, String password) {
16
    public String authenticateUser(String username, String password) {
-
 
17
    	
14
        try {
18
        try {
15
            HelperClient hsc = new HelperClient();
19
            HelperClient hsc = new HelperClient();
16
            in.shop2020.utils.HelperService.Client hClient = hsc.getClient();
20
            in.shop2020.utils.HelperService.Client hClient = hsc.getClient();
17
            CatalogDashboardUser catalogUser = hClient.authenticateCatalogUser(username, password);
21
            CatalogDashboardUser catalogUser = hClient.authenticateCatalogUser(username, password);
18
            return catalogUser.getRole() + "";
22
            return catalogUser.getRole() + "";
19
        } catch (Exception ex) {
23
        } catch (Exception ex) {
20
            ex.printStackTrace();
24
            ex.printStackTrace();
21
        }
25
        }
22
        return null;
26
        return null;
-
 
27
        
-
 
28
        
23
    }
29
    }
24
 
30
 
25
}
31
}