일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- Spring
- intellij
- Linux
- Spring Boot
- hikari
- Gradle
- datasource
- hikaricp
- 배열스트링
- between 날짜
- oracle between
- github
- MySQL
- catalina log
- log4j2
- STS
- oracle
- ubuntu
- Spring Security
- template
- mybatis
- 라즈베리파이
- log4j profile
- between date
- Java
- python 개발환경
- springboot
- ORACLE CLOUD
- bitbucket
- git
Archives
- Today
- Total
반응형
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- Spring
- intellij
- Linux
- Spring Boot
- hikari
- Gradle
- datasource
- hikaricp
- 배열스트링
- between 날짜
- oracle between
- github
- MySQL
- catalina log
- log4j2
- STS
- oracle
- ubuntu
- Spring Security
- template
- mybatis
- 라즈베리파이
- log4j profile
- between date
- Java
- python 개발환경
- springboot
- ORACLE CLOUD
- bitbucket
- git
Archives
- Today
- Total
목록SecurityContext (1)
파워노트

Spring Security 를 이용하여 로그인시에 로그인정보 저장 form 로그인을 통해 로그인시 detailService를 통해 로그인 정보를 불러와 로그인 유효성을 따져서 로그인을 하게 된다. 이때 최종 login success가 되고 나면 Authentication principal의 구현체에서 가져올수 있다. UserDetail 데이터를 Authentication 내부에 저장을하지마 또한 Session내에도 저장을 진행한다. SecurityContextHolder를 통한 로그인 정보 가져오기 Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); // 비로그인 접근 if (authenticati..
spring boot
2022. 1. 7. 18:46