일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 문자열
- OS
- 모던자바
- 객체지향
- 파이썬
- 최소 신장 트리
- 약수
- 스프링 시큐리티
- 알고리즘
- test
- MST
- 운영체제
- Junit5
- CS
- proxy
- BOJ
- 백준
- 다이나믹 프록시
- spring security
- 리플렉션
- 모던 자바 인 액션
- Reflection
- 스프링
- redis
- 프록시
- Spring
- Python
- Deadlock
- java
- 자바
- Today
- Total
목록Java&Spring/Spring Security (10)
Dev 달팽이 @_''
Remember me 인증 세션이 만료되고 웹 브라우저가 종료된 후에도 어플리케이션이 사용자를 기억하는 기능 Remember-Me 쿠키에 대한 Http 요청을 확인한 후 토큰 기반 인증을 사용해 유효성을 검사하고 토큰이 검증되면 사용자는 로그인 된다. 사용자 라이프 사이클 인증 성공(Remember-Me 쿠키 설정) 인증 실패(쿠키가 존재하면 쿠키 무효화) 로그아웃(쿠키가 존재하면 쿠키 무효화) http.rememberMe() : rememberMe 기능이 작동함 SecurityConfig .and() .rememberMe() .rememberMeParameter("remember") // 기본 파라미터명은 remember-me .tokenValiditySeconds(3600) // 토큰 만료 시간(De..

Logout http.logout() : 로그아웃 기능이 작동함 SecurityConfig @Override protected void configure(HttpSecurity http) throws Exception { http .logout() .logoutUrl("/logout") // 로그아웃 처리 .logoutSuccessUrl("/login") // 로그아웃 성공 후 이동 페이지 .addLogoutHandler(new LogoutHandler() { // 로그아웃 핸들러 @Override public void logout(HttpServletRequest request, HttpServletResponse response, Authentication authentication) { HttpSe..

Login Form 인증 UsernamePasswordAuthenticationFilter :로그인 인증 처리를 담당하고 인증 처리에 관련된 요청을 처리하는 필터 AuthPahtRequestMatcher('login) : 요청 정보의 매칭되는 url을 확인(default는 login) chain.doFilter : 매칭이 되지 않으면 그냥 다음 필터로 이동 Authentication(Username + Authentication) : Authentication 객체를 만들어서 사용자가 입력한 Username, password를 객체에 저장하여 실제 인증처리를 맡기는 역할 AuthenticationManager : Authentication 객체를 전달 받고 실제 인증을 맡게 됨, 내부적으로 Authent..

Form 인증 클라이언트가 서버에 /home을 요청하면 인증 확인을 거침 인증이 안되면 로그인 페이지로 다이렉트 클라이언트가 로그인 정보를 POST 메서드로 보냄 인증이 되면 서버가 세션을 생성하고 인증 토큰을 생성 토큰을 Security Context에 저장하고 이를 세션에 저장 클라이언트가 세션에 저장된 인증 토큰으로 접근 / 이증유지 http.formLogin() 인증 http.formLogin() : Form 로그인 인증 기능이 작동함 SecurityConfig.class @Override protected void configure(HttpSecurity http) throws Exception { // 인증 정책 http .authorizeRequests() .anyRequest().authe..