Authorization in Asset Infinity using JWT Token
"Asset Infinity" is a cloud-based asset tracking and management software designed to help organizations manage their assets effectively. "Asset Infinity" offers following types of authorization for users to access the software.
Asset Infinity JWT Token
Asset Infinity JWT (JSON Web Token) is a secure token that is used for authentication and authorization. It is a type of token that contains a JSON payload containing information about the user. Users are required to obtain a JWT token to access Asset Infinity.
A user can follow the below given steps to obtain a JWT token-
Step 1- Request JWT Token: The first step is to request the JWT token by sending a request to the Asset Infinity API server. The request should include the necessary authentication credentials, such as a company, email & password.
Base URL. : https://api.assetinfinity.io
API URL : /api/auth/signin
Full URL : https://api.assetinfinity.io/api/auth/signin
HTTP Method : POST
Headers: Content-Type: application/json-patch+json
Request Body:
{
"company": "string",
"email": "string",
"password": "string",
}
Response :
{
"isSuccess": true,
"message": "Success",
"statusCode": 200,
"data": {
...
"email": "{User email}",
"uid": "{User ID}",
"tokenExpiryMinutes": 2000,
"token": "XXXXXXXXXXXXXXXX"
......
}
}
Use Token value as Bearer Token in headers
Step 2- Obtain JWT Token: Upon receiving the request, the Asset Infinity API server will authenticate the user and issue a JWT token. The token will be valid for a specific period, after which it will expire.
Step 3- Use JWT Token: Once the user has obtained the JWT token, they can use it to authenticate and authorize API calls and other actions in Asset Infinity. The token is passed in the HTTP header as Bearer of the API call.