JWT1 Spring Security, JWT, 인증, 인가 Spring Security, JWT, 인증, 인가 Spring Security를 베이스로 JWT를 사용해서 해당 프로젝트의 인증과 인가를 구현한다. 이와 관련돼서 생성된 클래스는 다음과 같다. ● SecurityConfig : Spring Security관련 설정 ● UserAccount : Spring Security에서 인증 요소(principal)로 사용되는 객체. Userdetails를 상속받고 Account의 정보를 갖는다. ● PrincipalDetailService : 인증 시, DB에서 Account를 찾고 UserAccount로 반환하는 loadUserByUsername 메서드를 갖는다. ● JwtAutienticationFilter : jwt를 사용해서 인증 처리 ● JwtAutior.. 2022. 4. 18. 이전 1 다음