POST tokens
Require a new JWT token from the web api. The process to use a JWT token is as follows:
- Request a new JWT Token from client, by providing a
Token Request - Receive the token as a string
- Pass the token as a Bearer token in the Authorization header for every request
If the token is expired, you will receive a 401 Unauthorized http status code.
Request Information
URI Parameters
None.
Body Parameters
TokenRequestVMName | Description | Type | Additional information |
---|---|---|---|
UserName |
The user's username |
string |
None. |
Password |
The user's password |
string |
None. |
Request Formats
application/json, text/json
Sample:
{ "UserName": "sample string 1", "Password": "sample string 2" }
application/xml, text/xml
Sample:
<TokenRequestVM xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/FW.WebApi2.ViewModels"> <Password>sample string 2</Password> <UserName>sample string 1</UserName> </TokenRequestVM>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
A string containing the token
IHttpActionResultNone.
Response Formats
application/json, text/json, application/xml, text/xml
Sample:
Sample not available.