JWT Bearer Authentication
Last updated
Was this helpful?
Last updated
Was this helpful?
JWT Token is issued by API after successful login is performed. All subsequent requests have Authorization
header with value in format Bearer {tokenId}
. Successful response contains model in response body.
POST
http://{server-address}/api/auth
User authorization based on provided credentials. User authenticates to specific device, specified by DeviceName
property in request body. As result, JWT token is issued.
UserName*
string
Unique user name.
Password
string
User password
DeviceName*
string
The unique name of the device the user is logging into
GET
http://{server-address}/api/auth
Authorization*
String
JWT token in format Bearer {tokenId}
.
POST
http://{server-address}/api/auth/refresh
Extends session lifespan.
tokenId*
String
Token ID obtained during authorization.
refreshToken*
String
Refresh token obtained during authorization.
To sign out and terminate user session, send DELETE request.
DELETE
http://{server-address}/api/auth
Logs out user.
Authorization*
string
JWT token in format Bearer {tokenId}
.
In case of need, you can get user profile associated with tokenId
, using request below. Successful response contains model in response body.
Each session has its expiration time (may be modified in API settings). To extends lifespan of session, you can call refresh method. Successful response contains model in response body.