Skip to content

Commit

Permalink
fix: 행사 로그인 불가 버그 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Arachneee committed Aug 8, 2024
1 parent f84c194 commit c4db8d4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ private void validateMemberNameUnique(Event event, String updatedMemberName) {

public void validatePassword(EventLoginAppRequest request) throws HaengdongException {
Event event = getEvent(request.token());
if (event.isSamePassword(request.password())) {
if (event.isNotSamePassword(request.password())) {
throw new AuthenticationException(HaengdongErrorCode.PASSWORD_INVALID);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ public AdminInterceptor(AuthService authService, AuthenticationExtractor authent
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) {
log.trace("login request = {}", request.getRequestURI());

String requestURI = request.getRequestURI();

if (requestURI.endsWith("/login")) {
return true; // 요청을 계속 진행하도록 허용
}

HttpMethod method = HttpMethod.valueOf(request.getMethod());
if (HttpMethod.GET.equals(method) || HttpMethod.OPTIONS.equals(method)) {
return true;
Expand Down
4 changes: 2 additions & 2 deletions server/src/main/java/server/haengdong/domain/event/Event.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public boolean isTokenMismatch(String token) {
return !this.token.equals(token);
}

public boolean isSamePassword(String password) {
return this.password.equals(password);
public boolean isNotSamePassword(String password) {
return !this.password.equals(password);
}
}

0 comments on commit c4db8d4

Please sign in to comment.