# Croffle API

{% hint style="info" %}
**로그인시 발급받는 JWT 토큰 설명**
{% endhint %}

## JWT Token Payload

로그인 API 요청시 받은 access\_token 및 refresh\_token의 payload

<table><thead><tr><th width="225.33333333333331">Type</th><th width="91">Exp</th><th>Payload Keys</th></tr></thead><tbody><tr><td>access_token</td><td>1h</td><td>typ, _sq, sub, iat, exp, aud, iss</td></tr><tr><td>refresh_token</td><td>7d</td><td>typ, _sq, sub, iat, exp, aud, iss</td></tr></tbody></table>

{% hint style="info" %}
\_sq값이 account의 primary key 값
{% endhint %}

## Check JWT Token

{% embed url="<https://jwt.io>" %}
jwt 토큰 확인
{% endembed %}

### How to JWT Token

<table><thead><tr><th width="167.33333333333331">Type</th><th width="328">Header</th><th>Where?</th></tr></thead><tbody><tr><td>access_token</td><td>Authentication: Bearer {access_token}</td><td>로그인, 회원가입 제외한 API</td></tr><tr><td>refresh_token</td><td>Authentication: Bearer {refresh_token}</td><td>refresh 요청 API</td></tr></tbody></table>

{% hint style="info" %}
refresh\_token 요청시 access\_token 재발급
{% endhint %}
