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
- 백준
- Oracle
- 스프링 부트 쇼핑몰 프로젝트 with JPA
- 프로그래머스
- Flutter
- postgresql
- 플러터
- 리눅스
- 시큐리티
- 스프링
- javascript
- Java
- springboot
- baekjoon
- backjoon
- 자바스크립트
- spring
- 자바
- 파이썬
- 데이터베이스
- DB
- JPA
- python
- CS
- Spring Security
- 자료구조
- 데이터
- 네트워크
- CS지식
- 스프링부트
Archives
- Today
- Total
Jin's Dev Story
[Spring Security] Authentication의 메커니즘 본문
- Authentication에는 인증된 결과 뿐만 아니라 인증을 하기 위한 정보, 인증을 받기 위한 정보가 하나의 객체에 들어가 있음
- AuthenticationProvider는 입력된 인증을 보고 허가된 인증을 내주는 방식으로 인증 허가를 판단하며 처리 가능한 Authentication에 대해서 알려주는 support메서드를 지원
- Authorities에는 '어디를 갈 수 있는지', '어떤 역할을 할 수 있는지'에 대한 권한 정보로 이를 구현(implement)한 GrantedAuthority에 관한 정보들이 저장되어있음
- Authentication에 들어가 있는 Token들은 각각의 Filter들을 통해 발행된 Token들
- Credentials은 인증을 받기 위해 필요한 정보들로 대표적인 예시로는 비밀번호
- Principal은 인증된 결과에 대한 정보. credentials를 이용해 인증을 받고 그 결과임
- Details은 위의 정보 외의 인증에 관여된 주변 정보들을 갖고 있음
AuthenticationProvider
- Authentication을 제공하는 것을 Authentication Provider
- Authentication Provider는 credentials나 Principal이 있는 Authentication을 받아서 인증을 하고 인증된 결과를 다시 Authentication객체로 전달하는 역할
- 이때 Authentication Provider는 어떤 인증에 대해 승인을 해줄지 Authentication Manager에게 알려줘야 하기 때문에 support()라는 메서드를 제공
- Authentication Manager은 인증 대상과 방식이 다양할 수 있어 여러개일 수 있음
'Web & Android > Spring Security' 카테고리의 다른 글
[Spring Security] 기본 동작 구조 (0) | 2023.10.17 |
---|---|
[Spring Security] Spring Security란? (0) | 2023.10.17 |
[Spring Security] Authentication의 구조 (0) | 2023.10.17 |
[Spring Security] Jwt Token 사용 (0) | 2023.10.17 |
[Spring Security] Security 사용 (1) | 2023.10.17 |