참고
https://docs.spring.io/spring-security/site/docs/4.2.12.RELEASE/apidocs/overview-summary.html
Overview (Spring Security 4.2.12.RELEASE API)
Authentication processing mechanisms, which respond to the submission of authentication credentials using various protocols (eg BASIC, CAS, form login etc).
docs.spring.io
https://stackoverflow.com/questions/44359792/log-out-user-by-admin-spring-security
Log out user by admin Spring Security
I'd like your help to get how implement this function: admin gets all logged in users using sessionRegistry.getAllPrincipals() and then can log off someone. I know how to log off current user (se...
stackoverflow.com
서버를 재시작 하지않고 세션을 수정하여 사용자 접근을 제한
SessionRegistryImpl 객체를 SessionRegistry 빈에 주입 후 sessionManagement에 적용
@Autowired로 주입된 registry(SessionRegistry)객체를 아래와 같은 방법으로 원하는 세션을 만료시킨다
새로고침 시 연결 끊김 확인
해당 계정의 연결은 끊어졌으나 세션 정보는 삭제 되지 않는 문제가 발생
HttpSessionEventPublisher를 빈으로 등록 만료시 세션 정보도 갱신된다
HttpSessionEventPublisher는 HttpSessionListener를 상속 받는다
만료 후 페이지 포워딩
'java' 카테고리의 다른 글
Spring boot Xss filter java config (0) | 2021.04.27 |
---|---|
Spring Boot Log4j2 java config (0) | 2021.04.23 |
Spring Boot Log4j2 기본설정 (0) | 2021.04.22 |
Spring Boot DB Connection(HikariCp) Java Config (0) | 2021.04.22 |
Spring Boot Security Java Config (0) | 2021.04.22 |