Jason Web Token

이지은·2021년 3월 23일
0

In authentication, when the user successfully logs in using their credentials,
a JSON Web Token will be returned.

(로그인 성공시 jwt로 만든 access token을 받는다)

access token을 local storage에 저장 -> api 호출 시 request header에 담아 보내기

① Local Storage:
stores data with no expiration date (해당 domain에 영구 저장)

② Session Storage:
similar to local storage but expires when browser is closed.
해당 domain의 한 session에만 저장하고 싶을 때. 창 닫으면 data 날라감

③ Cookie: 해당 domain에 날짜를 설정하고 그 때까지만 저장하고 싶을 때

Local Storage and Session Storage are nearly identical with the exception of persistence. Session Storage is only available for the duration of the browser session
whereas Local Storage permanently stores data in the domain.


*API(Application Programming Interface)*

: A software intermediary that allows two applications to talk to each other. 
profile
Front-end 🐕🦶

0개의 댓글