diff --git "a/4Week_Record/4Week_\355\225\234\354\212\271\354\227\260.md" "b/4Week_Record/4Week_\355\225\234\354\212\271\354\227\260.md" index b3dad81..b3e345b 100644 --- "a/4Week_Record/4Week_\355\225\234\354\212\271\354\227\260.md" +++ "b/4Week_Record/4Week_\355\225\234\354\212\271\354\227\260.md" @@ -77,6 +77,7 @@ ### ๐Ÿ™ˆ ์š”๊ตฌ์‚ฌํ•ญ ๋ฐ ์ ‘๊ทผ๋ฐฉ๋ฒ• ์ •๋ฆฌ ๐Ÿ™ˆ ### JWT ํ”„๋กœ์„ธ์Šค + 1. ์‚ฌ์šฉ์ž๊ฐ€ `username, password` ๋ฅผ ์ž…๋ ฅํ•˜๊ณ  ์„œ๋ฒ„๋กœ ๋กœ๊ทธ์ธ ์š”์ฒญ์„ ๋ณด๋‚ธ๋‹ค. 2. ๋กœ๊ทธ์ธ ์„ฑ๊ณต์‹œ ์„œ๋ฒ„๋Š” ๋น„๋ฐ€ํ‚ค๋กœ ์„œ๋ช…์„ ํ•˜๊ณ  ๊ณต๊ฐœํ‚ค๋กœ ์•”ํ˜ธํ™” ํ•˜์—ฌ `Access Token` ์„ ๋ฐœ๊ธ‰ํ•œ๋‹ค. 3. `์‘๋‹ต Header` ์— `Access Token` ์„ ๋‹ด์•„ ํด๋ผ์ด์–ธํŠธ์—๊ฒŒ ๋ณด๋‚ธ๋‹ค. @@ -237,6 +238,7 @@ public Map getClaims(String accessToken) { ``` - jwt ๋ฐฉ์‹ ๋กœ๊ทธ์ธ์„ ์œ„ํ•ด `formLogin.disable()` ์„ค์ •์„ ํ•ด์ฃผ์–ด์•ผ ํ•œ๋‹ค. - ํƒ€๋„๋ฉ”์ธ์—์„œ API ํ˜ธ์ถœ์„ ํ•˜๊ธฐ ์œ„ํ•ด `cors ํ—ˆ์šฉ` ์„ค์ •์„ ํ•ด์ฃผ์–ด์•ผ ํ•œ๋‹ค. + - [cors ์˜ค๋ฅ˜ ํ•ด๊ฒฐ](https://github.com/likelion-backendschool/FinalProject_JuMinJi_team7/pull/25) - `/api/*/member/login` ์š”์ฒญ ์™ธ ๋ชจ๋“  `/api/**` ์š”์ฒญ์€ ์ธ์ฆ๋œ ์‚ฌ์šฉ์ž์—ฌ์•ผ ํ•œ๋‹ค. - ์ง€์ •๋œ ํ•„ํ„ฐ๋ณด๋‹ค ๋จผ์ € ์‹คํ–‰๋˜๋„๋ก `jwtAuthorizationFilter` (์ปค์Šคํ…€ ํ•„ํ„ฐ) ๋ฅผ ์ถ”๊ฐ€ํ•œ๋‹ค.