유저 JWT 활용하기
What's in the JWT Payload
토큰의 데이터 구조를 설명합니다.
Token Payloads
AccessToken Payload
{
"uid": "2acc2f34-c116-4328-83a3-53ce9c92160b",
"pid": "4c6551cef3f5bfe41be8332d457cc607",
"uem": "dev@hopae.io",
"iat": 1697086176,
"exp": 1697089776
}
사용자의 정보를 jwt token을 decode한 후 얻어오는 것은 안전하지는 않습니다. 실제로 uem은 optional property입니다. Get User Information API 를 사용하여 사용자의 정보를 요청하세요.
RefreshToken Payload
{
"sub": "2acc2f34-c116-4328-83a3-53ce9c92160b",
"iat": 1697086176,
"exp": 1697690976
}
Was this page helpful?