Authentification endpoints
Version 4.1 by Achraf El Kari on 2021/11/22 15:57
Introduction
This documentation describes how to get authenticated to the iXPath App.
Validation
The endpoint should verify those points :
- Encrypt the password with SHA256 algorithme
- Verify if the user's environment is active
- Remove all unnecessary verifications (Env's verification)
- Verify if the user is activated.
- Throw error 401 and 403 for the authentication faillure.
Endpoints
URL [method] | Description | Input example | Output example |
/auth [POST] | generate a token to get access to all other endpoints. | The input data are "login" and "password", and they must be placed in the header of the request as the following example :
| { "timestamp": 1637162043978, "status": "200", "data": { "Token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsI mlkIjoiMSIsImVudiI6ImlYUGF0aCIsInRpbWUiOjE2Njg2OTgwNDM 0OTN9.0aiAL7BHTanzm1yrELOOaHonWOqPddaUu26lL1GpAJJ6MPxK9eUta RAi2m_gV8OhcYhPE_wgu8lESxMevT90YA", "Expiration_date": "2022/11/17 16:14:03", "Default_env": "iXPath" } } |
Possible errors or exceptions
- If information is not filled in correctly or the user doesn't exist, the response will look like this example :
1
2
3
4
5
6
2
3
4
5
6
{
"timestamp": 1637164878357,
"status": "500",
"error": "the user's information not found : user, password",
"thechnicalError": "the user's information not found : user, password"
}
"timestamp": 1637164878357,
"status": "500",
"error": "the user's information not found : user, password",
"thechnicalError": "the user's information not found : user, password"
}