Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- JPA
- OAuth2
- 리소스 서버
- WebApplication Type
- Application Event
- 외부설정
- 백트래킹
- Application Runner
- 브루트포스
- @ConfigurationProperties
- 스프링부트
- Spring Security
- webjar
- application.properties
- @Profile
- 백준
- JsonSerializer
- Application Argument
- HATEOAS
- cors
- 정적 리소스
- 백기선
- HttpMessageConverters
- EnableAutoConfiguration
- 다익스트라
- 알고리즘
- rest api
- 리소스핸들러
- 스프링 부트
- AuthenticationPrincipal
Archives
- Today
- Total
목록AuthenticationPrincipal (1)
아카이브
[스프링 기반 REST API 개발] 시큐리티 현재 사용자 조회하기
SecurityContext 자바 ThreadLocal 기반 구현으로 인증 정보를 담고 있다. ※ ThreadLocal ? 오직 한 Thread에 의해서 read/write 가능한 variable을 생성할 수 있도록 하는 것(Thread Local Variable) 인증 정보를 꺼내는 방법 Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); // Anonymous인 경우 principal = "anonymousUser" 로 String 이다. @AuthenticationPrincipal spring.security.User user 인증을 안했다 ? null : username과 authorities..
Spring/스프링 기반 REST API 개발
2021. 1. 9. 22:01