This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
documentation:2.1:authrest [2019/04/06 10:07]
cmaudoux [Configuration]
documentation:2.1:authrest [2019/09/04 18:51] (current)
maxbes [REST Dialog]
Line 24: Line 24:
 ===== REST Dialog ===== ===== REST Dialog =====
-REST web services ​have just to respond with a "​result"​ key in a JSON file. Auth/UserDB can add an "info" ​array that will be stored in session data (without reading "​Exported variables"​).+LemonLDAP::​NG will call the endpoints you declared at various steps during the login process. 
 +The request performed by LemonLDAP::​NG is a POST on the URL you specified, the content of the POST is a JSON document (''​Content-Type:​ application/​json''​). 
 +REST web services ​must respond with a success HTTP code (200), and the response must be a JSON document containing a ''​result''​ key Auth/​UserDB ​endpoints ​can add an ''​info'' ​array that will be stored in session data (without reading "​Exported variables"​).
 ^  URL  ^  Query  ^  Response ​ ^ ^  URL  ^  Query  ^  Response ​ ^
-|  Authentication URL  | JSON file: ''​{"​user":​$user,"​password":​$password}''​ | JSON file: ''​{"​result":​true/​false,"​info":​{...}}''​ | +|  Authentication URL  | ''​{"​user":​$user,"​password":​$password}''​ | ''​{"​result":​true/​false,"​info":​{...}}''​ | 
-|  User data URL  | JSON file: ''​{"​user":​$user}''​ | JSON file: ''​{"​result":​true/​false,"​info":​{"​uid":"​dwho",​...}}''​ | +|  User data URL  | ''​{"​user":​$user}''​ | ''​{"​result":​true/​false,"​info":​{"​uid":"​dwho",​...}}''​ | 
-|  Password confirmation URL  | JSON file: ''​{"​user":​$user,"​password":​$password}''​ | JSON file: ''​{"​result":​true/​false}''​ | +|  Password confirmation URL  | ''​{"​user":​$user,"​password":​$password}''​ | ''​{"​result":​true/​false}''​ | 
-|  Password change URL  | JSON file: ''​{"​user":​$user,"​password":​$password}''​ | JSON file: ''​{"​result":​true/​false}''​ |+|  Password change URL  | ''​{"​user":​$user,"​password":​$password}''​ | ''​{"​result":​true/​false}''​ |
-<note tip>To have just one call, you can only set REST authenticationset datas in "​info"​ key response and set Null as User Database.</​note>​+<note tip>To have only one REST call during the login process, you can set REST only as an Authentication backendconfigure ​Null as your User Database, and make sure the REST authentication URL send all your user attributes in the ''​info''​ response key </​note>​