-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6a9ca9e
commit ec905e2
Showing
31 changed files
with
139 additions
and
76 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
server/.gradle/7.6.1/executionHistory/executionHistory.lock
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 0 additions & 61 deletions
61
...r/Recruit-Api/src/main/java/com/econovation/recruit/utils/aop/PasswordValidateAspect.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 16 additions & 2 deletions
18
...cruit-Common/src/main/java/com/econovation/recruitcommon/annotation/PasswordValidate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,24 @@ | ||
package com.econovation.recruitcommon.annotation; | ||
|
||
import com.econovation.recruitcommon.aspect.PasswordValidateAspect; | ||
import java.lang.annotation.Documented; | ||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
import javax.validation.Constraint; | ||
import javax.validation.Payload; | ||
|
||
@Target(ElementType.FIELD) | ||
@Documented | ||
@Constraint(validatedBy = PasswordValidateAspect.class) | ||
@Target({ | ||
// ElementType.METHOD, | ||
ElementType.FIELD, | ||
ElementType.PARAMETER, | ||
}) | ||
@Retention(RetentionPolicy.RUNTIME) | ||
public @interface PasswordValidate {} | ||
public @interface PasswordValidate { | ||
String message() default "Invalid password"; | ||
Class<?>[] groups() default {}; | ||
Class<? extends Payload>[] payload() default {}; | ||
} |
52 changes: 52 additions & 0 deletions
52
...uit-Common/src/main/java/com/econovation/recruitcommon/aspect/PasswordValidateAspect.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
package com.econovation.recruitcommon.aspect; | ||
|
||
import com.econovation.recruitcommon.annotation.PasswordValidate; | ||
import com.econovation.recruitcommon.exception.InvalidPasswordException; | ||
import javax.validation.ConstraintValidator; | ||
import javax.validation.ConstraintValidatorContext; | ||
import org.aspectj.lang.annotation.Aspect; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Aspect | ||
@Component | ||
public class PasswordValidateAspect implements ConstraintValidator<PasswordValidate, String> { | ||
|
||
private boolean isValidPassword(String password) { | ||
if (password == null || password.length() < 10) { | ||
return false; // 비밀번호 길이가 10글자 미만인 경우 검증 실패 | ||
} | ||
|
||
boolean hasDigit = false; | ||
boolean hasSpecialChar = false; | ||
|
||
for (char ch : password.toCharArray()) { | ||
if (Character.isDigit(ch)) { | ||
hasDigit = true; | ||
} else if (isSpecialCharacter(ch)) { | ||
hasSpecialChar = true; | ||
} | ||
} | ||
|
||
return hasDigit && hasSpecialChar; | ||
} | ||
|
||
private boolean isSpecialCharacter(char ch) { | ||
// 특수 문자 여부를 확인하는 로직을 구현 | ||
// 예를 들어, 일부 특수 문자를 확인할 수 있습니다. | ||
return ch == '@' || ch == '#' || ch == '!' || ch == '$' || ch == '%' || ch == '^' | ||
|| ch == '&' || ch == '*'; | ||
} | ||
|
||
@Override | ||
public void initialize(PasswordValidate constraintAnnotation) { | ||
ConstraintValidator.super.initialize(constraintAnnotation); | ||
} | ||
|
||
@Override | ||
public boolean isValid(String value, ConstraintValidatorContext context) { | ||
if (!isValidPassword(value)) { | ||
throw InvalidPasswordException.EXCEPTION; | ||
} | ||
return true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
...ommon/src/main/java/com/econovation/recruitcommon/exception/InvalidPasswordException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.econovation.recruitcommon.exception; | ||
|
||
public class InvalidPasswordException extends RecruitCodeException { | ||
public static final RecruitCodeException EXCEPTION = new InvalidPasswordException(); | ||
|
||
private InvalidPasswordException() { | ||
super(GlobalErrorCode.INVALID_PASSWORD); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,15 +10,13 @@ | |
public class SendRawEmailDto { | ||
// Replace [email protected] with your "From" address. | ||
// This address must be verified with Amazon SES. | ||
private final String sender = "공연 정산관리팀 <support@dudoong.com>"; | ||
private final String sender = "에코노베이션 Recruit팀 <recruit@econovation.com>"; | ||
// Replace [email protected] with a "To" address. If your account | ||
// is still in the sandbox, this address must be verified. | ||
private final String recipient; | ||
// The subject line for the email. | ||
private final String subject; | ||
|
||
private final String bodyHtml; | ||
|
||
private final List<RawEmailAttachmentDto> rawEmailAttachments = new ArrayList<>(); | ||
|
||
@Builder | ||
|
3 changes: 3 additions & 0 deletions
3
server/Recruit-Infrastructure/src/main/resources/application-infrastructure.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters