<
From version < 2.1 >
edited by Outhman Moustaghfir
on 2021/11/17 17:29
To version < 8.1 >
edited by Outhman Moustaghfir
on 2022/06/13 13:17
>
Change comment: Renamed from xwiki:Documentation.iXPath.User Guide.API endpoints.User endpoints.WebHome

Summary

Details

Page properties
Content
... ... @@ -1,17 +1,39 @@
1 -= Introduction =
1 += Introduction =
2 2  
3 3  This documentation describes how to get authenticated to the iXPath App.
4 4  
5 +
6 += Validation =
7 +
8 +The endpoint should verify those points :
9 +
10 +- Encrypt the password with SHA256 algorithms
11 +
12 +- Verify if the user's environment is active
13 +
14 +- Remove all unnecessary verifications (Env's verification)
15 +
16 +- Verify if the user is activated.
17 +
18 +- Throw errors 401 and 403 for the authentication failure.
19 +
5 5  = Endpoints =
6 6  
7 -|(% style="width:230px" %)**URL [method]**|(% style="width:379px" %)**Description**|(% style="width:279px" %)**Input example**|(% style="width:472px" %)**Output example**
8 -|(% style="width:230px" %)/auth [POST]|(% style="width:379px" %)generate a token to get access to all other endpoints.|(% style="width:279px" %)(((
9 -The input data are "login" and "password", and they must be placed in the **//__header__ //**of the request as the following example :
22 +|(% style="width:162px" %)**URL [method]**|(% style="width:284px" %)**Description**|(% style="width:580px" %)**Input example**|(% style="width:472px" %)**Output example**
23 +|(% style="width:162px" %)/auth [POST]|(% style="width:284px" %)generate a token to get access to all other endpoints.|(% style="width:580px" %)(((
24 +The input data must be placed in the **//__JSON body__ //**of the request as the following example :
10 10  
11 -* __login__: user4r
12 -* __password__: abcdef
26 +{{code language="json"}}
27 +{
28 + "user" : "user1",
29 + "password" : "abcd.12345",
30 + "env" : "iXPath"
31 +}
32 +{{/code}}
13 13  
14 -[[image:2021-11-17_16h10_57.png]]
34 +__NB__ : "user" and "password" are **mandatory**.
35 +
36 +meanwhile, "env" param could be generated automatically if it is **not** **mentioned** or **no more active**.
15 15  )))|(% style="width:472px" %){{code language="JSON" layout="LINENUMBERS"}}{
16 16   "timestamp": 1637162043978,
17 17   "status": "200",
... ... @@ -25,7 +25,6 @@
25 25   }
26 26  }{{/code}}
27 27  
28 -
29 29  = Possible errors or exceptions =
30 30  
31 31  * If information is not filled in correctly or the user doesn't exist, the response will look like this example :
... ... @@ -33,7 +33,7 @@
33 33  {{code language="JSON" layout="LINENUMBERS"}}
34 34  {
35 35   "timestamp": 1637164878357,
36 - "status": "500",
57 + "status": "401",
37 37   "error": "the user's information not found : user, password",
38 38   "thechnicalError": "the user's information not found : user, password"
39 39  }
This wiki is hosted and managed by iXPath
Powered by XWiki 13.3 debian