-
[Security OAUTH2.0] Credential client, Public client개발/Spring 2024. 2. 1. 01:07
출처: https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth2-auth-code-flow Public client
front channel 요청에서 바로 엑세스 토큰을 주기 때문에 보안 레벨이 낮다. client id만 있어도 된다. 이 과정은 implicit flow라고 한다.
Credential client
front channel에서는 엑세스 토큰 발급을 위한 code를 내려주며, 해당 code를 back channel에서 인가서버로 요청을 보내는데 이 때 client secret을 함께 보낸다. 그러고 나서 인가 서버가 검증을 한 뒤에 엑세스 토큰을 발급해주기 때문에 보안 레벨이 높다. Authorization code flow라고 한다. 리소스 서버에 자원 요청을 할 때 엑세스 토큰을 Authorization 헤더에 Bearer <token>으로 해서 보낸다. 이 방법은 Bearer authentication(혹은 token authentication)이라고 한다.
'개발 > Spring' 카테고리의 다른 글
@RequiredArgsConstructor를 사용 못하는 경우 (0) 2023.12.24 [Spring Security5] 인가 예외(접근 거부) (1) 2023.12.23 [Spring Security5] Config에서 defaultSuccessUrl(), successHandler()의 순서 문제 (0) 2023.12.22 [Spring Security5] SecurityContext에 가졌던 작은 오해 (0) 2023.12.18 [Spring security5] 인증/인가에 대한 간략한 흐름 (0) 2023.12.16