인증_인가
-
토큰, 세션, 쿠키 알고가자인증_인가 2023. 3. 14. 15:22
들어가기전에 토큰, 세션, 쿠키는 모두 사용자가 웹 서비스를 이용할 때, '나'라는 것을 증명하기 위해 식별하고 인증하기 위한 기술이다. 비슷하게 생긴 이 친구들을 더이상 헷갈리지 말고 깰끔하게 정리해보자. 먼저, 들어가기 전에 이런 이야기를 해본다. 은행 창구에서 은행원과 마주 앉아 적금 신청을 하고 있는데, 신분증을 달라고 한다. 은행원은 나의 신원을 확인한 뒤, 적금 상품에 가입도 해주고 첫 거래가 필요하다고 하여 다른 계좌에서 이체도 해준다. 알아서 착착. 그런데, 적금 상품에 가입 해주는 한 번의 인증과 다른 계좌에서 이체를 해주는 한 번의 인증, 총 2번의 인증이 필요하거늘 한 번의 인증으로 모든 것이 통과됐다. 나는 생각한다. '당연하지. 나는 처음에 신분증을 보여줬고 은행원이 나를 계속 기..