Changes for page Authentification endpoints
Last modified by Outhman Moustaghfir on 2022/06/13 13:17
Change comment:
Uploaded new attachment "2021-11-17_16h10_57.png", version {1}
Summary
-
Page properties (4 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,0 @@ 1 -Authentification endpoints - Parent
-
... ... @@ -1,1 +1,0 @@ 1 -Documentation.iXPath.User Guide.API endpoints.WebHome - Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki.a elkari1 +XWiki.omoustaghfir - Content
-
... ... @@ -1,54 +1,0 @@ 1 -= Introduction = 2 - 3 -This documentation describes how to get authenticated to the iXPath App. 4 - 5 - 6 -= Validation = 7 - 8 -The endpoint should verify those points : 9 - 10 -- Encrypt the password with SHA256 algorithme 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 error 401 and 403 for the authentication faillure. 19 - 20 -= Endpoints = 21 - 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 are "login" and "password", and they must be placed in the **//__header__ //**of the request as the following example : 25 - 26 -* __login__: user4r 27 -* __password__: abcdef 28 - 29 -[[image:2021-11-17_16h10_57.png]] 30 -)))|(% style="width:472px" %){{code language="JSON" layout="LINENUMBERS"}}{ 31 - "timestamp": 1637162043978, 32 - "status": "200", 33 - "data": { 34 - "Token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsI 35 -mlkIjoiMSIsImVudiI6ImlYUGF0aCIsInRpbWUiOjE2Njg2OTgwNDM 36 -0OTN9.0aiAL7BHTanzm1yrELOOaHonWOqPddaUu26lL1GpAJJ6MPxK9eUta 37 -RAi2m_gV8OhcYhPE_wgu8lESxMevT90YA", 38 - "Expiration_date": "2022/11/17 16:14:03", 39 - "Default_env": "iXPath" 40 - } 41 -}{{/code}} 42 - 43 -= Possible errors or exceptions = 44 - 45 -* If information is not filled in correctly or the user doesn't exist, the response will look like this example : 46 - 47 -{{code language="JSON" layout="LINENUMBERS"}} 48 -{ 49 - "timestamp": 1637164878357, 50 - "status": "500", 51 - "error": "the user's information not found : user, password", 52 - "thechnicalError": "the user's information not found : user, password" 53 -} 54 -{{/code}}