Skip to content

Commit

Permalink
Merge pull request #74 from Next-Connect-Project/hotfix
Browse files Browse the repository at this point in the history
PR : #63 fix : 토큰 재발급 에러
  • Loading branch information
heenahan authored Jun 12, 2023
2 parents 4e68ddf + 3c7bd40 commit ee05f09
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import lombok.Data;

import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.Cookie;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,12 @@ protected void doFilterInternal(HttpServletRequest request, HttpServletResponse

String uri = request.getRequestURI();

System.out.println(uri);

Type type = Type.ATK;

if (!StringUtils.hasText(accessToken) && uri.equals("/api/auth/reissue")) sendError(response, 401, AuthErrorCode.NOT_EXISTS, "헤더에 에세스 토큰을 넣어주세요.");

if (StringUtils.hasText(accessToken) && !uri.equals("/api/auth/reissue")) {
try {
Token authToken = Token.builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS)
.and()
.authorizeRequests()
.antMatchers("/api/auth/login/naver", "/api/auth/logout",
.antMatchers("/api/auth/login/naver", "/api/auth/logout", "/api/auth/reissue",
"/api/recruit/main", "/api/recruit/search", "/api/recruit/detail/**",
"/api/promotion/resources", "/api/promotion/resources/firstPage", "/api/promotion/detail/**")
.permitAll()
Expand Down

0 comments on commit ee05f09

Please sign in to comment.