CommonController.java 1.5 KB

123456789101112131415161718192021222324252627282930313233
  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="/passwordCheck", method=RequestMethod.POST )
  13. @ResponseBody
  14. public String passwordCheck( @RequestParam(value="password", required=true) String password ) {
  15. /**
  16. * 0: OK (규칙에 부합됨)
  17. * 1: 입력된 패스워드가 null이거나 없음.
  18. * 2: 입력된 패스워드가 16자 이상임 15자리까지 입력가능.
  19. * 3: 입력된 패스워드가 2조합 미만이고 10자리 미만.
  20. * 4: 입력된 패스워드가 2조합인데, 8자리 미만임.
  21. * 5:
  22. * 6: 입력된 패스워드가 3자리 이상 연속된 값이 포함됨. (예, abc, def, 123)
  23. * 7: 입력된 패스워드가 키보드 조합으로 3자리 이상 연속된 값이 포함됨. (예, asd, qwe, jkl)
  24. * 8: 입력된 패스워드가 3자리 이상 같은 값이 포함됨. (예, aaa, 222)
  25. * 99: 에러
  26. */
  27. return LifeCenterFunction.checkPw( password );
  28. }
  29. }