dungphanxuan / yii2-starter-kit-lite

Yii2 Starter kit for begin your application
Other
41 stars 19 forks source link

Api Authentication #3

Closed dungphanxuan closed 7 years ago

dungphanxuan commented 7 years ago

Todo for Api Authentication

dungphanxuan commented 7 years ago

reference 1e6ff1cd6e35b7f9afee4d9528f110b5b89f201e

dungphanxuan commented 7 years ago

Example: POST /api/user/login Data user/user Response:

{
"status": 1,
"code": 200,
"message": "Login success.",
"data": {
"user_id": 3,
"username": "user",
"access_token": "Your access token",
"expires": 1482291941
}
}

Get api/user/info?token=Your access token Result image

If not send access token

image