package com.uas.sso.controller;

import com.alibaba.fastjson.JSON;
import com.uas.account.AccountConfig;
import com.uas.account.core.Const;
import com.uas.account.core.Status;
import com.uas.account.core.util.QRCodeUtil;
import com.uas.account.entity.*;
import com.uas.account.exception.VisibleError;
import com.uas.account.service.*;
import com.uas.account.viewmodel.AssetView;
import com.uas.account.web.BaseController;
import com.uas.sso.*;
import com.uas.sso.Token;
import com.uas.sso.common.util.HttpUtil;
import com.uas.sso.web.waf.request.WafRequestWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.ServletOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 找回密码页面controller
 * @since 2017年11月3日09:53:59
 * @author suntg
 */
@Controller
@RequestMapping("/user/pwd")
public class ResetPasswordController extends BaseController {

	/**
	 * 密码找回页面
	 * 
	 * @throws Exception
	 */
	@RequestMapping(method = RequestMethod.GET)
	public ModelAndView loginPage(ModelMap model) throws Exception {
		WafRequestWrapper wr = new WafRequestWrapper(request);
		String returnUrl = wr.getParameter(SSOConfig.ReturnURLParam);
		String appId = wr.getParameter(AccountConfig.AppIdParam);
		model.put("appId", appId);
		model.put("returnURL", returnUrl);
		return new ModelAndView("user/pwd", model);
	}

}
