From 2e294f322e1c2630e1cb66062d75b681f45d2122 Mon Sep 17 00:00:00 2001 From: yerim <86309538+yerimm99@users.noreply.github.com> Date: Mon, 19 Feb 2024 21:31:14 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20uri=20=EB=B3=80=EA=B2=BD,=20toke?= =?UTF-8?q?n=20=EC=BF=BC=EB=A6=AC=20=EC=A0=84=EB=8B=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/aromanticcat/umcproject/security/SecurityConfig.java | 4 ++-- .../security/oauth/MyAuthenticationSuccessHandler.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/aromanticcat/umcproject/security/SecurityConfig.java b/src/main/java/aromanticcat/umcproject/security/SecurityConfig.java index 8da7fc9..0449554 100644 --- a/src/main/java/aromanticcat/umcproject/security/SecurityConfig.java +++ b/src/main/java/aromanticcat/umcproject/security/SecurityConfig.java @@ -38,10 +38,10 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { .and() .authorizeRequests() // 요청에 대한 인증 설정 .antMatchers("/v3/api-docs/**", "/swagger-ui/**", "/swagger-resources/**").permitAll() - .antMatchers("/", "/login", "/signUp", "/nangman-collection/", + .antMatchers("/", "/login/**", "/signUp", "/nangman-collection/", "/nangman-collection/{nangmanLetterId}/like", "/nangman-collection/{nangmanLetterId}").permitAll() - .antMatchers("/token/**").permitAll() // 토큰 발급을 위한 경로는 모두 허용 + .antMatchers("/token/**", "/oauth2/**").permitAll() // 토큰 발급을 위한 경로는 모두 허용 .antMatchers("/css/**", "/images/**", "/js/**", "/favicon.ico", "/h2-console/**").permitAll() .anyRequest().authenticated() // 그 외의 모든 요청은 인증이 필요하다. .and() diff --git a/src/main/java/aromanticcat/umcproject/security/oauth/MyAuthenticationSuccessHandler.java b/src/main/java/aromanticcat/umcproject/security/oauth/MyAuthenticationSuccessHandler.java index 1de276f..330f2e6 100644 --- a/src/main/java/aromanticcat/umcproject/security/oauth/MyAuthenticationSuccessHandler.java +++ b/src/main/java/aromanticcat/umcproject/security/oauth/MyAuthenticationSuccessHandler.java @@ -49,7 +49,7 @@ public void onAuthenticationSuccess(HttpServletRequest request, HttpServletRespo // accessToken을 쿼리스트링에 담는 url을 만들어준다. String targetUrl = UriComponentsBuilder.fromUriString("https://dev.nangmancat.shop/") - //.queryParam("accessToken", token.getAccessToken()) + .queryParam("accessToken", token.getAccessToken()) .build() .encode(StandardCharsets.UTF_8) .toUriString();