Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat] 현재 로그인한 유저 어노테이션 구현 #237

Merged
merged 8 commits into from
Mar 3, 2024

Conversation

its-sky
Copy link
Member

@its-sky its-sky commented Mar 3, 2024

🚀PullRequest🚀

📟 관련 이슈

💻 작업 내용

  • @loginuser라고 하는 현재 로그인한 유저의 아이디를 바인딩시켜주는 어노테이션을 개발하였습니다.
  • 해당 개발 사항으로 인한 주요 변경사항은 다음과 같습니다.
    1. SecurityContextHolder에 Custom하게 구현한 인증 객체를 SecurityContextHolder에 저장 후 나중에 API가 call 되었을 때 @AuthenticationPrincipal 어노테이션이 호출되었을 때 해당 인증 객체를 꺼내서 userId를 반환해주는 방식임(SpEL 사용)
  • 참고로 AuthenticationPrincipal은 @loginuser에 붙어 있음.

📝 리뷰 노트

@its-sky its-sky requested a review from 0lynny March 3, 2024 14:00
@its-sky its-sky self-assigned this Mar 3, 2024
Copy link
Member

@0lynny 0lynny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오 .. 이렇게 해줄수도 있군요 !! 수고많으셨습니다~!

@its-sky its-sky merged commit b20c76e into develop Mar 3, 2024
1 check passed
@its-sky its-sky deleted the feature/#236 branch March 12, 2024 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feat] 현재 로그인한 유저 정보 추출 어노테이션 구현
2 participants