HomeAboutMeBlogGuest
© 2025 Sejin Cha. All rights reserved.
Built with Next.js, deployed on Vercel
✍🏻
Learnary (learn - diary)
/
👑
Spring Security JWT Mechanism
👑

Spring Security JWT Mechanism

progress
Done
Tags
Spring
What, WhyHow REFER

What, Why


  • 🪙
    JWT token

How


  • FIleter 를 통한 인증 여부 확인
      1. 토큰 추출
      1. 1번 값 기반 decoding
      1. 커스텀한 인증 객체로 생성하기 → Upper Class : Authentication 인증 객체
      1. 컨텍스트 홀더안에 담아내기
       
       

 REFER


추가적인 정보 담아 내기 RemoteAddress
[SpringSecurity] 인증부가기능(WebAuthenticationDetails, WebAuthenticationDetailsSource)
인증 부가기능이란? SpringSecurity에서 보통 ID와 PASSWORD를 이용하여 로그인 처리를 합니다. 하지만 ID, PASSWORD 이외에도 추가로 파라미터를 전달하여 인증과정 속에서 활용하거나 인증 이후에도 이 정보들을 참조하여 사용자가 서버에 접근할 수 있도록 하고 싶다면 이러한 방법이 있습니다. WebAuthenticationDetails, WebAuthenticationDetailsSource 이 두 개의 클래스에 의해 파라미터를 추가할 수 있는데, 이 것의 흐름은 이렇습니다.
[SpringSecurity] 인증부가기능(WebAuthenticationDetails, WebAuthenticationDetailsSource)
https://sloth.tistory.com/39
[SpringSecurity] 인증부가기능(WebAuthenticationDetails, WebAuthenticationDetailsSource)