6.1 JWT Token Authentication
AnQiCMS uses JWT (JSON Web Token) for user authentication:
- The Token is obtained after the user logs in
- Include Token in the Header of subsequent requests
- Format:
Token: {token}
6.2 Interfaces requiring authentication
The following types of interfaces require user authentication:
- User information management interface
- Order Management Interface
- Favorite Management Interface
- Comment Posting Interface
- Shopping Cart Management Interface
6.3 Token Acquisition and Refreshing
Token obtained through login interface:
{
"code": 0,
"msg": "登录成功",
"data": {
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
}