POST api/auth/login
API thực hiện đăng nhập và trả về token trong trường hợp đăng nhập thành công.
Request Information
URI Parameters
None.
Body Parameters
Thông tin đăng nhập bao gồm tên người dùng và mật khẩu.
LoginModel| Name | Description | Type | Additional information |
|---|---|---|---|
| Username |
Tên người dùng hoặc địa chỉ email để đăng nhập. |
string |
None. |
| Password |
Mật khẩu của người dùng. |
string |
None. |
Request Formats
application/json, text/json
Sample:
{
"Username": "sample string 1",
"Password": "sample string 2"
}
application/x-www-form-urlencoded
Sample:
Response Information
Resource Description
Token JWT nếu đăng nhập thành công, hoặc Unauthorized nếu thất bại.
IHttpActionResultNone.
Response Formats
application/json, text/json
Sample:
Sample not available.