강의

멘토링

커뮤니티

Inflearn Community Q&A

yhwjjang19954515's profile image
yhwjjang19954515

asked

Spring Security

3) Understanding the concept of authentication - Authentication

강사님 세션과 관련해서 질문이 있습니다.

Written on

·

294

0

강사님 안녕하세요. 항상 좋은 강의 감사드립니다!

 

세션과 관련해서 인증에 성공하면 JSESSIONID를 키로해서 세션 저장소에 SecurityContext를 저장하는데 이 작업을 SessionManagementfileter에서 하는지 아니면 usernamepasswordauthenticationfilter에서 하는지 궁금합니다.!

Spring Securityjavaspring-boot

Answer 1

3

leaven님의 프로필 이미지
leaven
Instructor

SecurityContext 를 세션에 저장하는 역할은 SecurityContextPersistanceFilter 가 담당하고 있습니다.

SecurityContextPersistanceFilter 의 역할이 SecurityContext 를 생성, 삭제, 조회 등의 역할을 하고 있습니다.

Usernamepasswordauthenticationfilter 는 SecurityContext 안에 인증에 성공한 인증정보 즉 Authentication 객체를 저장하는 역할을 합니다.

SessionManagementfileter 는 사용자의 세션관리를 하지만 SecurityContext 를 저장하는 역할을 하지는 않습니다.

SecurityContextPersistanceFilter  강의챕터를 참고하시기 바랍니다.

yhwjjang19954515's profile image
yhwjjang19954515

asked

Ask a question