Postman 模拟注册、登录
Postman#
header 设置
X-Requested-With:XMLHttpRequest
Content-Type:application/json
注册#
URL:127.0.0.1:8000/api/auth/register
请求:
{
"name": "滑稽",
"email": "antic@lab.test",
"password": "A123456."
}
登录#
URL:127.0.0.1:8000/api/auth/login
请求
{
"email": "antic@lab.test",
"password": "A123456."
}
响应
{
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC8xMjcuMC4wLjE6ODAwMFwvYXBpXC9sb2dpbiIsImlhdCI6MTU3NjM5NTc2NywiZXhwIjoxNTc2Mzk5MzY3LCJuYmYiOjE1NzYzOTU3NjcsImp0aSI6ImIzQUJoZU9UQllzOTJYVFQiLCJzdWIiOjEsInBydiI6Ijg3ZTBhZjFlZjlmZDE1ODEyZmRlYzk3MTUzYTE0ZTBiMDQ3NTQ2YWEifQ.ejpdK-Vj9YkLJNW9tdFqD47JquY_lE-kIOK1mlyhw2A",
"token_type": "bearer",
"expires_in": 3600
}