<
From version < 4.1 >
edited by Achraf El Kari
on 2021/11/22 15:57
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
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.aelkari
1 +XWiki.omoustaghfir
Content
... ... @@ -7,7 +7,7 @@
7 7  
8 8  The endpoint should verify those points :
9 9  
10 -- Encrypt the password with SHA256 algorithme
10 +- Encrypt the password with SHA256 algorithms
11 11  
12 12  - Verify if the user's environment is active
13 13  
... ... @@ -15,18 +15,25 @@
15 15  
16 16  - Verify if the user is activated.
17 17  
18 -- Throw error 401 and 403 for the authentication faillure.
18 +- Throw errors 401 and 403 for the authentication failure.
19 19  
20 20  = Endpoints =
21 21  
22 22  |(% style="width:162px" %)**URL [method]**|(% style="width:284px" %)**Description**|(% style="width:580px" %)**Input example**|(% style="width:472px" %)**Output example**
23 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 are "login" and "password", and they must be placed in the **//__header__ //**of the request as the following example :
24 +The input data must be placed in the **//__JSON body__ //**of the request as the following example :
25 25  
26 -* __login__: user4r
27 -* __password__: abcdef
26 +{{code language="json"}}
27 +{
28 + "user" : "user1",
29 + "password" : "abcd.12345",
30 + "env" : "iXPath"
31 +}
32 +{{/code}}
28 28  
29 -[[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**.
30 30  )))|(% style="width:472px" %){{code language="JSON" layout="LINENUMBERS"}}{
31 31   "timestamp": 1637162043978,
32 32   "status": "200",
... ... @@ -47,7 +47,7 @@
47 47  {{code language="JSON" layout="LINENUMBERS"}}
48 48  {
49 49   "timestamp": 1637164878357,
50 - "status": "500",
57 + "status": "401",
51 51   "error": "the user's information not found : user, password",
52 52   "thechnicalError": "the user's information not found : user, password"
53 53  }
This wiki is hosted and managed by iXPath
Powered by XWiki 13.3 debian