Subversion Repositories SmartDukaan

Rev

Rev 26570 | Rev 26592 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 26570 Rev 26590
Line 22... Line 22...
22
import org.springframework.beans.factory.annotation.Value;
22
import org.springframework.beans.factory.annotation.Value;
23
import org.springframework.http.MediaType;
23
import org.springframework.http.MediaType;
24
import org.springframework.http.ResponseEntity;
24
import org.springframework.http.ResponseEntity;
25
import org.springframework.stereotype.Controller;
25
import org.springframework.stereotype.Controller;
26
import org.springframework.transaction.annotation.Transactional;
26
import org.springframework.transaction.annotation.Transactional;
-
 
27
import org.springframework.web.bind.annotation.PathVariable;
27
import org.springframework.web.bind.annotation.RequestBody;
28
import org.springframework.web.bind.annotation.RequestBody;
28
import org.springframework.web.bind.annotation.RequestMapping;
29
import org.springframework.web.bind.annotation.RequestMapping;
29
import org.springframework.web.bind.annotation.RequestMethod;
30
import org.springframework.web.bind.annotation.RequestMethod;
30
import org.springframework.web.bind.annotation.RequestParam;
31
import org.springframework.web.bind.annotation.RequestParam;
31
 
32
 
Line 159... Line 160...
159
	@RequestMapping(value = ProfitMandiConstants.URL_USER_GOOGLE_LOGIN, method = RequestMethod.POST)
160
	@RequestMapping(value = ProfitMandiConstants.URL_USER_GOOGLE_LOGIN, method = RequestMethod.POST)
160
	public ResponseEntity<?> googleLogin(HttpServletRequest request, @RequestBody GoogleLoginRequest googleLoginRequest)
161
	public ResponseEntity<?> googleLogin(HttpServletRequest request, @RequestBody GoogleLoginRequest googleLoginRequest)
161
			throws ProfitMandiBusinessException {
162
			throws ProfitMandiBusinessException {
162
		return responseSender.ok(googleLoginProcessor.process(googleLoginRequest.getToken()));
163
		return responseSender.ok(googleLoginProcessor.process(googleLoginRequest.getToken()));
163
	}
164
	}
-
 
165
	@RequestMapping(value = "/store/token/{storeCode}", method = RequestMethod.POST)
-
 
166
	public ResponseEntity<?> googleLogin(HttpServletRequest request, @PathVariable String storeCode)
-
 
167
			throws ProfitMandiBusinessException {
-
 
168
		return responseSender.ok(googleLoginProcessor.processStore(storeCode));
-
 
169
	}
164
 
170
 
165
	@RequestMapping(value = ProfitMandiConstants.URL_USER_TOKEN_IS_EXPIRED, method = RequestMethod.GET)
171
	@RequestMapping(value = ProfitMandiConstants.URL_USER_TOKEN_IS_EXPIRED, method = RequestMethod.GET)
166
	public ResponseEntity<?> tokenIsExpired(HttpServletRequest request, @RequestParam(name = "token") String token)
172
	public ResponseEntity<?> tokenIsExpired(HttpServletRequest request, @RequestParam(name = "token") String token)
167
			throws ProfitMandiBusinessException {
173
			throws ProfitMandiBusinessException {
168
		LOGGER.info("requested url : " + request.getRequestURL().toString());
174
		LOGGER.info("requested url : " + request.getRequestURL().toString());