CommonController.java 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. package com.lemon.lifecenter.common;
  2. import org.springframework.stereotype.Controller;
  3. import org.springframework.web.bind.annotation.RequestMapping;
  4. import org.springframework.web.bind.annotation.RequestMethod;
  5. import org.springframework.web.bind.annotation.RequestParam;
  6. import org.springframework.web.bind.annotation.ResponseBody;
  7. import org.springframework.web.servlet.ModelAndView;
  8. @Controller
  9. @RequestMapping("/common")
  10. public class CommonController extends LifeCenterController {
  11. // 이용 약관 및 개인정보 활용 동의
  12. @RequestMapping( value="/accept" )
  13. public ModelAndView accept() {
  14. ModelAndView mv = setMV( "common/accept" );
  15. return mv;
  16. }
  17. // 패스워드 규칙 체크
  18. @RequestMapping( value="/passwordCheck", method=RequestMethod.POST )
  19. @ResponseBody
  20. public String passwordCheck( @RequestParam(value="password", required=true) String password ) {
  21. /**
  22. * 0: OK (규칙에 부합됨)
  23. * 1: 입력된 패스워드가 null이거나 없음.
  24. * 2: 입력된 패스워드가 16자 이상임 15자리까지 입력가능.
  25. * 3: 입력된 패스워드가 2조합 미만이고 10자리 미만.
  26. * 4: 입력된 패스워드가 2조합인데, 8자리 미만임.
  27. * 5:
  28. * 6: 입력된 패스워드가 3자리 이상 연속된 값이 포함됨. (예, abc, def, 123)
  29. * 7: 입력된 패스워드가 키보드 조합으로 3자리 이상 연속된 값이 포함됨. (예, asd, qwe, jkl)
  30. * 8: 입력된 패스워드가 3자리 이상 같은 값이 포함됨. (예, aaa, 222)
  31. * 99: 에러
  32. */
  33. return LifeCenterFunction.checkPw( password );
  34. }
  35. }