Skip to content

Commit

Permalink
Merge pull request #88 from TravelCompass-UMC/refactor/68
Browse files Browse the repository at this point in the history
[#68] 경로 부분 개방
  • Loading branch information
Enble authored Mar 6, 2024
2 parents 5f50171 + b22dd98 commit 79499ff
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,20 @@ protected SecurityFilterChain securityFilterChain(
.authorizeHttpRequests(authHttp -> authHttp
.requestMatchers(
"/health",

"/oauth2/authorization/naver", // 로그인
"/getCarDuration", // 자가용 소요시간 api
"/login/oauth2/code/**", // code, state 반환
"/token/**", // 로컬에게 토큰 반환
"/oauth/**", // 프론트에게 토큰 반환

"/locations/regions/**", // 지역별 장소 리스트 조회
"/locations/**", // 장소 상세 조회
"/plans/search", // 여행계획 조회

"/users/**", // 로그아웃, 회원탈퇴
"/me/**" // 마이페이지
"/plans/search" // 여행계획 조회
)
.permitAll()
.anyRequest().permitAll()
//.anyRequest().authenticated()
//.anyRequest().permitAll()
.anyRequest().authenticated()

)
.oauth2Login(oauth2Login -> oauth2Login
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public void onAuthenticationSuccess(
String targetUrl = String.format(
"http://travel-compass.netlify.app/oauth/callback?access-token=%s&refresh-token=%s",
jwt.getAccessToken(), jwt.getRefreshToken()
// "http://localhost:8080/token?access-token=%s&refresh-token=%s", jwt.getAccessToken(), jwt.getRefreshToken()
// "http://localhost:8080/token/token?access-token=%s&refresh-token=%s", jwt.getAccessToken(), jwt.getRefreshToken()
);
// 실제 Redirect 응답 생성
getRedirectStrategy().sendRedirect(request, response, targetUrl);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class TokenController {
@ApiResponses({
@io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "COMMON_200", description = "Success"),
})
@GetMapping("/token")
@GetMapping("/token/token")
public ResponseEntity<Map<String, String>> tokenPagge(
@RequestParam(name = "access-token") String accessToken,
@RequestParam(name = "refresh-token") String refreshToken
Expand Down

0 comments on commit 79499ff

Please sign in to comment.