POST api/Auth/Login
Authenticates a user and generates a token if the credentials are valid.
Request Information
URI Parameters
None.
Body Parameters
The authentication request containing the username and password.
AuthRequest| Name | Description | Type | Additional information |
|---|---|---|---|
| Username | string |
None. |
|
| Password | string |
None. |
Request Formats
application/json, text/json
Sample:
{
"Username": "sample string 1",
"Password": "sample string 2"
}
Response Information
Resource Description
An representing the result of the login attempt. Returns a BadRequest response with an error message if the request is invalid or credentials are incorrect. Returns an Ok response with the generated token if the login is successful.
IHttpActionResultNone.
Response Formats
application/json, text/json
Sample:
Sample not available.