MilkTea24 / realworld-backend

RealWorld 프로젝트 백엔드 파트를 구현한 프로젝트입니다.
MIT License
0 stars 0 forks source link

feat: Spring Security 인증 기능 개발 #7

Closed MilkTea24 closed 8 months ago

MilkTea24 commented 8 months ago

요약

한일

image

InitialAuthenticationFilter

로그인 페이지에 필터링되는 필터 요청에서 username과 password를 가져와 AuthenticationManager에게 인증 정보가 맞는지 확인을 요청한다. 인정 정보가 맞으면 JWT 토큰을 생성하여 response에 담아 보낸다.

AuthenticationManager

AuthenticationConfiguration에서 AuthenticationManager를 가져온다.

UsernamePasswordAuthenticationProvider

UserDetailsService를 불러온 유저의 정보와 인증 정보를 비교한다.

JwtAuthenticationFIlter

Request에서 보내온 JWT 토큰을 검증한다.

JaCoCo Report

image