Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BE] 행사 로그인 버그 수정 #283

Merged
merged 2 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ private void updateMemberName(Event event, String beforeName, String afterName)

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);
}
}
Loading