File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
src/main/java/com/rtu/chalkac/global/config Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 11# 전체 아키텍처 구조
2- ![ image] ( https://github.com/user-attachments/assets/032dd8c8-1df3-40af-a566-02a18a67ba43 )
3-
4- ## 현재 문제점
5- 1 . EC2의 과도한 생성과 삭제로 인해 요금 발생 -> 서버리스로 전환
6- 2 . 낮은 보안성 -> 토큰 처리 필요
2+ ![ image] ( https://github.com/user-attachments/assets/032dd8c8-1df3-40af-a566-02a18a67ba43 )
Original file line number Diff line number Diff line change 11package com .rtu .chalkac .global .config ;
22
33import lombok .extern .slf4j .Slf4j ;
4+ import org .springframework .beans .factory .annotation .Value ;
45import org .springframework .context .annotation .Bean ;
56import org .springframework .context .annotation .Configuration ;
67import org .springframework .security .authentication .AuthenticationManager ;
2829@ Configuration
2930public class SecurityConfig {
3031
32+ @ Value ("${auth.jwt.issuer}" )
33+ private String issuer ;
34+
3135 @ Bean
3236 protected SecurityFilterChain configure (HttpSecurity httpSecurity ) throws Exception {
3337 httpSecurity
@@ -65,7 +69,6 @@ public AuthenticationProvider jwtAuthenticationProvider() {
6569
6670 @ Bean
6771 public JwtDecoder jwtDecoder () {
68- String issuer = "https://cognito-idp.ap-northeast-2.amazonaws.com/ap-northeast-2_AbvZMxTi4" ;
6972 NimbusJwtDecoder jwtDecoder = JwtDecoders .fromOidcIssuerLocation (issuer );
7073 jwtDecoder .setJwtValidator (JwtValidators .createDefaultWithIssuer (issuer ));
7174 return jwtDecoder ;
You can’t perform that action at this time.
0 commit comments