Authentication
Login
Endpoint
POST /auth/login
Headers
Key
Value
Description
Authorization
{token}
JWT access token
App-Id
{app_id}
Unique identifier for the application
Request Body
{
"userId": "string",
"nickname": "string",
"profileImageUrl": "string"
}
Response
{
"status": 200,
"message": "success",
"userId": "string",
"expiresAt": "date"
}
JWT Access Token
Access Token Payload
{
"sub": "user123", // ์ฌ์ฉ์ ๊ณ ์ ID
"app_id": "rakuraku3", // ์ ํ๋ฆฌ์ผ์ด์
ID
"iat": 1705080000, // ๋ฐ๊ธ ์๊ฐ (Issued At, Unix timestamp)
"exp": 1705086400 // ๋ง๋ฃ ์๊ฐ (Expiration, Unix timestamp)
}
Key
Type
์ค๋ช
sub
string
์ฌ์ฉ์ ๊ณ ์ ID
iat
int
ํ ํฐ ๋ฐ๊ธ ์๊ฐ (Unix timestamp)
exp
int
ํ ํฐ ๋ง๋ฃ ์๊ฐ (Unix timestamp)
JWT ์๊ณ ๋ฆฌ์ฆ
์๊ณ ๋ฆฌ์ฆ:
HS256
(HMAC-SHA256)Signature ์์ฑ ๋ฐฉ์:
HMACSHA256( base64UrlEncode(header) + "." + base64UrlEncode(payload), secretKey )
Last updated