728x90

- 실질적으로 검증을 하는 클래스
- authenticate, support 메서드 제공
- authenticate : 실제 인증
- 위임받은 authenticaation 객체로 ID검증, Password검증, 추가 검증을 진행한다.
- ID검증 : userDetailService를 통해 ID검증을 하여 있다면 UserDetails 타입을, 없다면 UserNotFoundException을 반환한다.
- password검증 : ID검증에서 반환 받은 UserDetails와 위임받은 authentication 객체의 password를 비교하여 일치하는지 검증한다.(일치하지 않을 경우, BadCredentialException)
- 추가 검증 : 추가적으로 검증
- 모든 검증이 끝나게 되면 Authentication 인증 객체를 생성하여 AuthenticationManager에 해당 객체를 반환한다.
- 위임받은 authenticaation 객체로 ID검증, Password검증, 추가 검증을 진행한다.
- support : 인증이 되는지 조건을 확인
- authenticate : 실제 인증
728x90