-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
์ด๋ค ๊ธฐ๋ฅ์ธ๊ฐ์?
- Authenticationย ๊ฐ์ฒด๋ฅผ ํตํด ์ฌ์ฉ์ ์ ๋ณด๋ฅผ ์กฐํํ๊ณ JWT ์์ฑ
- ํ๋ก ํธ์์ ๋ก๊ทธ์ธ์ด ๋์๋ค๊ณ ์ฒ๋ฆฌํด์ ๋ก๊ทธ์ธ๋ ์ํ ์ ์งํ๊ธฐ
์์ ์์ธ ๋ด์ฉ
- ์์
๋ก๊ทธ์ธ ์ฑ๊ณต ํ ์ป์ ์ ๋ณด๋ฅผ ๋ฐํ์ผ๋ก JWT ์์ฑ
-
TokenService๊ตฌ์ฑ ๋ด์ฉ์ ๋ฐํ์ผ๋ก TokenAuthenticationFilter, AuthController์์ - ํ๋ก ํธ์๊ฒ ๋ณด๋ผ ์ฟ ํค httpOnly ์ฟ ํค๋ก ์ค์ ํ๊ธฐ
-
- ์๋ฒ์์ ๋ง๋ JWT ํ๋ก ํธ๋ก ์ ๋ฌํ๊ธฐ
- ํ๋ก ํธ์์ jwt๋ฅผ localStorage๊ฐ ์๋ ์ฟ ํค๋ก ์ฌ์ฉํ๋ ์ฝ๋๋ก ์์ ํ๊ธฐ
๋ด ์ฝ๋์ ์ดํดํ๊ธฐ ์ํ ์ฌ์ ์ ๋ณด
- JWT ๋ง๋ค๊ธฐ
TokenProvider- Jwt์ ์์ฑ ๋ฐ ๊ฒ์ฆ๋ง ์ฒ๋ฆฌ
TokenService- TokenProvider๋ฅผ ํ์ฉํด ๋น์ฆ๋์ค ๋ก์ง์ ๊ตฌํ
- Authenticationย ๊ฐ์ฒด๋ฅผ ๋ฐ์ ์ก์ธ์ค ํ ํฐ๊ณผ ๋ฆฌํ๋ ์ ํ ํฐ ์์ฑ
- Redis์ ์ญํ
- ๋ฆฌํ๋ ์ ํ ํฐ ์ ์ฅ
- ํ ํฐ ๋ง๋ฃ ์ฒ๋ฆฌ