{"id":2527,"date":"2021-08-03T11:50:29","date_gmt":"2021-08-03T02:50:29","guid":{"rendered":"https:\/\/www.skyer9.pe.kr\/wordpress\/?p=2527"},"modified":"2021-08-03T13:26:44","modified_gmt":"2021-08-03T04:26:44","slug":"passay-globalization-%eb%8b%a4%ea%b5%ad%ec%96%b4-%ec%a7%80%ec%9b%90","status":"publish","type":"post","link":"https:\/\/www.skyer9.pe.kr\/wordpress\/?p=2527","title":{"rendered":"passay globalization (\ub2e4\uad6d\uc5b4 \uc9c0\uc6d0)"},"content":{"rendered":"<h1>passay globalization (\ub2e4\uad6d\uc5b4 \uc9c0\uc6d0)<\/h1>\n<p><a href=\"http:\/\/ychaonote.com\/article\/244.html\">\ucc38\uc870<\/a><\/p>\n<h2>\ud55c\uae00 \uc624\ub958 \uba54\uc2dc\uc9c0 \ud45c\uc2dc<\/h2>\n<p>\uc544\ub798\uc640 \uac19\uc774 \ud2b9\uc815 \uc624\ub958 \uba54\uc2dc\uc9c0\ub97c \ud55c\uae00\ub85c \ud45c\uc2dc\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<pre><code class=\"language-java\">public class PasswordConstraintValidator implements ConstraintValidator&lt;ValidPassword, String&gt; {\n\n    @Override\n    public void initialize(ValidPassword arg0) {\n    }\n\n    @Override\n    public boolean isValid(String password, ConstraintValidatorContext context) {\n        final StaticMessageSource messageSource = new StaticMessageSource();\n\n        messageSource.addMessage(&quot;TOO_SHORT&quot;, Locale.KOREA, &quot;\ube44\ubc00\ubc88\ud638\ub294 {0}-{1} \uc790\ub9ac\uc5ec\uc57c \ud569\ub2c8\ub2e4.&quot;);\n        messageSource.addMessage(&quot;INSUFFICIENT_LOWERCASE&quot;, Locale.KOREA, &quot;\ube44\ubc00\ubc88\ud638\uc5d0 \ucd5c\uc18c {0} \uac1c \uc774\uc0c1\uc758 \uc18c\ubb38\uc790\uac00 \uc788\uc5b4\uc57c \ud569\ub2c8\ub2e4.&quot;);\n        messageSource.addMessage(&quot;INSUFFICIENT_DIGIT&quot;, Locale.KOREA, &quot;\ube44\ubc00\ubc88\ud638\uc5d0 \ucd5c\uc18c {0} \uac1c \uc774\uc0c1\uc758 \uc22b\uc790\uac00 \uc788\uc5b4\uc57c \ud569\ub2c8\ub2e4.&quot;);\n        messageSource.addMessage(&quot;INSUFFICIENT_SPECIAL&quot;, Locale.KOREA, &quot;\ube44\ubc00\ubc88\ud638\uc5d0 \ucd5c\uc18c {0} \uac1c \uc774\uc0c1\uc758 \ud2b9\uc218\ubb38\uc790\uac00 \uc788\uc5b4\uc57c \ud569\ub2c8\ub2e4.&quot;);\n\n        PasswordValidator validator = new PasswordValidator(\n                new SpringMessageResolver(messageSource, Locale.KOREA),\n                Arrays.asList(\n                        new LengthRule(8, 30),\n                        \/\/ new CharacterRule(EnglishCharacterData.UpperCase, 1),\n                        new CharacterRule(EnglishCharacterData.LowerCase, 1),\n                        new CharacterRule(EnglishCharacterData.Digit, 1),\n                        new CharacterRule(EnglishCharacterData.Special, 1),\n                        new IllegalSequenceRule(EnglishSequenceData.Alphabetical, 5, false),\n                        new IllegalSequenceRule(EnglishSequenceData.Numerical, 5, false),\n                        new IllegalSequenceRule(EnglishSequenceData.USQwerty, 5, false),\n                        new WhitespaceRule()));\n\n        RuleResult result = validator.validate(new PasswordData(password));\n        if (result.isValid()) {\n            return true;\n        }\n        context.disableDefaultConstraintViolation();\n        context.buildConstraintViolationWithTemplate(\n                        Joiner.on(&quot;,&quot;).join(validator.getMessages(result)))\n                .addConstraintViolation();\n        return false;\n    }\n}<\/code><\/pre>\n<pre><code class=\"language-properties\"># Passay properties\nHISTORY_VIOLATION=Password matches one of {0} previous passwords.\nILLEGAL_WORD=Password contains the dictionary word &#039;{0}&#039;.\nILLEGAL_WORD_REVERSED=Password contains the reversed dictionary word &#039;{0}&#039;.\nILLEGAL_DIGEST_WORD=Password contains a dictionary word.\nILLEGAL_DIGEST_WORD_REVERSED=Password contains a reversed dictionary word.\nILLEGAL_MATCH=Password matches the illegal pattern &#039;{0}&#039;.\nALLOWED_MATCH=Password must match pattern &#039;{0}&#039;.\nILLEGAL_CHAR=Password {1} the illegal character &#039;{0}&#039;.\nALLOWED_CHAR=Password {1} the illegal character &#039;{0}&#039;.\nILLEGAL_QWERTY_SEQUENCE=Password contains the illegal QWERTY sequence &#039;{0}&#039;.\nILLEGAL_ALPHABETICAL_SEQUENCE=Password contains the illegal alphabetical sequence &#039;{0}&#039;.\nILLEGAL_NUMERICAL_SEQUENCE=Password contains the illegal numerical sequence &#039;{0}&#039;.\nILLEGAL_USERNAME=Password {1} the user id &#039;{0}&#039;.\nILLEGAL_USERNAME_REVERSED=Password {1} the user id &#039;{0}&#039; in reverse.\nILLEGAL_WHITESPACE=Password {1} a whitespace character.\nILLEGAL_NUMBER_RANGE=Password {1} the number &#039;{0}&#039;.\nILLEGAL_REPEATED_CHARS=Password contains {2} sequences of {0} or more repeated characters, but only {1} allowed: {3}.\nINSUFFICIENT_UPPERCASE=Password must contain {0} or more uppercase characters.\nINSUFFICIENT_LOWERCASE=Password must contain {0} or more lowercase characters.\nINSUFFICIENT_ALPHABETICAL=Password must contain {0} or more alphabetical characters.\nINSUFFICIENT_DIGIT=Password must contain {0} or more digit characters.\nINSUFFICIENT_SPECIAL=Password must contain {0} or more special characters.\nINSUFFICIENT_CHARACTERISTICS=Password matches {0} of {2} character rules, but {1} are required.\nINSUFFICIENT_COMPLEXITY=Password meets {1} complexity rules, but {2} are required.\nINSUFFICIENT_COMPLEXITY_RULES=No rules have been configured for a password of length {0}.\nSOURCE_VIOLATION=Password cannot be the same as your {0} password.\nTOO_LONG=Password must be no more than {1} characters in length.\nTOO_SHORT=Password must be {0} or more characters in length.\nTOO_MANY_OCCURRENCES=Password contains {1} occurrences of the character &#039;{0}&#039;, but at most {2} are allowed.<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>passay globalization (\ub2e4\uad6d\uc5b4 \uc9c0\uc6d0) \ucc38\uc870 \ud55c\uae00 \uc624\ub958 \uba54\uc2dc\uc9c0 \ud45c\uc2dc \uc544\ub798\uc640 \uac19\uc774 \ud2b9\uc815 \uc624\ub958 \uba54\uc2dc\uc9c0\ub97c \ud55c\uae00\ub85c \ud45c\uc2dc\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. public class PasswordConstraintValidator implements ConstraintValidator&lt;ValidPassword, String&gt; { @Override public void initialize(ValidPassword arg0) { } @Override public boolean isValid(String password, ConstraintValidatorContext context) { final StaticMessageSource messageSource = new StaticMessageSource(); messageSource.addMessage(&quot;TOO_SHORT&quot;, Locale.KOREA, &quot;\ube44\ubc00\ubc88\ud638\ub294 {0}-{1} \uc790\ub9ac\uc5ec\uc57c \ud569\ub2c8\ub2e4.&quot;); messageSource.addMessage(&quot;INSUFFICIENT_LOWERCASE&quot;, Locale.KOREA, &quot;\ube44\ubc00\ubc88\ud638\uc5d0\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.skyer9.pe.kr\/wordpress\/?p=2527\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2527","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2527","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2527"}],"version-history":[{"count":3,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2527\/revisions"}],"predecessor-version":[{"id":2530,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2527\/revisions\/2530"}],"wp:attachment":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2527"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2527"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2527"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}