728x90
Step
Step 1. 사전작업 : https://radpro.tistory.com/309
Step 2. 로그인 인증 구현 ( 인증 / Authentication ) : 현재 글
Step 3. 자격증명 및 검증 구현 ( 인가 / Authorization ) : https://radpro.tistory.com/311
흐름
1. 클라가 서버측에 로그인 인증 요청
2. 로그인 인증 담당 Security Filter( JwtAuthenticationFilter )가 클라의 로그인 인증 정보 수신
3. Security Filter가 수신한 로그인 인증 정보를 AuthenticationManager에게 전달해 인증처리를 위임
4. authenticationManger가 Custom UserDetailsService( MemberDetailsSercive )에게
사용자의 UserDetails 조회를 위임
5. Custom UserDetailsService가 사용자의 크리덴셜을 DB에서 조회한 후,
AuthenticationManager에게 사용자의 UserDetails 전달
6. AuthenticationManager가 로그인 인증 정보와 UserDetails의 정보를 비교해 인증처리
7. JWT 생성 후 클라에대한 응답으로 전달
* JwtAutheticationFilter와 MemverDetailsService를 구현해야함
* 4번6번은 Spring Security의 AutheticationManager가 대신 처리해줄것임 (신경 쓰지X)
728x90
'Codestates [Back-end] > 데일리 로그 [TIL]' 카테고리의 다른 글
22.09.27 메모 (0) | 2022.09.27 |
---|---|
22.09.27 JWT - SpringSecurity 인증 (Step 3. 자격증명 및 검증 구현) [진행중] (0) | 2022.09.27 |
22.09.27 JWT - SpringSecurity 인증 (step 1. 사전 작업) (2) | 2022.09.27 |
22.09.26 JWT - 생성 및 검증 테스트 (1) | 2022.09.26 |
22.09.26 JWT 이론 (0) | 2022.09.26 |