Spring Security 로그인 후 사용자 정보얻기
Spring Security 로그인 후 사용자 정보를 어떻게 가져올까?이전에 Spring Boot가아닌 Spring Legacy로 구현할땐 로그인은 항상 세션으로 setAttribute 해서 키값으로 getAttribute 가져와서 ModelAndView 로 넘겨주곤
velog.io
https://studyandwrite.tistory.com/508
Spring Security - SecurityContextHolder에서 로그인 사용자 정보 가져오기
0. 문제 Spring Security, JWT을 이용해 로그인이나 권한 처리 등의 작업을 하다 보면 "로그인을 한 사용자의 정보를 어떻게 가져와야 할까"에 대한 고민을 하게 됩니다. 토큰을 어디에 저장하고 어떤
studyandwrite.tistory.com
SecurityContextHolder (Spring Security 4.0.4.RELEASE API)
Associates a given SecurityContext with the current execution thread. This class provides a series of static methods that delegate to an instance of SecurityContextHolderStrategy. The purpose of the class is to provide a convenient way to specify the strat
docs.spring.io
https://monynony0203.tistory.com/56
[Principal] 로그인 된 유저의 정보를 JWT(Token)로 불러오기
그 전까지는 api에서 직접 userid를 건내고 JPA CRUD FindByUserId를 통해 유저의 정보를 불러왔었다. 하지만 회원가입을 하고, 로그인을 하게 되면 token을 제공하는 방식으로 UMC APP API를 팀원분께서 생성
monynony0203.tistory.com
🔎 jwt api controller 예제: Google 검색
www.google.co.kr
Spring Security + JWT로 인증 인가 구현하기
Spring Security + JWT
velog.io
https://mingyum119.tistory.com/250
[SpringSecurity] JWT 정보를 이용해 Controller에서 현재 로그인한 사용자의 정보 추출하기
JWT로 로그인한 경우에 사용자의 정보를 가져와 Controller에서 사용해야하는 상황이 있다. JWT 토큰을 생성하는 코드에서 Claims 에 넣은 정보를 현재 토큰에서 추출하는 방법으로 구현할 수 있는데,
mingyum119.tistory.com
'학교 > 캡스톤디자인과창업프로젝트' 카테고리의 다른 글
코드 작성 규칙 (0) | 2024.01.24 |
---|---|
RequestParam으로 Date 값 받기 (0) | 2024.01.24 |
쿡세이브 ERD (0) | 2024.01.24 |
@NotNull 또는 @Column(nullable = false) (0) | 2024.01.23 |
비밀번호 불일치 (0) | 2024.01.23 |