Table of Contents

REST

Authentication Users Password

Presentation

This backend can be used to delegate authentication to some webservices.

Configuration

In Manager, go in General Parameters > Authentication modules and choose REST for authentication, users and/or password modules.

Then you just have to set REST URL to provide wanted services:

Module Parameter
Authentication Authentication URL
User database User data URL
Password Password confirmation URL
Password Password change URL

REST Dialog

REST web services just have to respond with a “result” key in a JSON file. Auth/UserDB can add a “info” array to will be copied is session data (without reading “Exported variables”).

Parameter Query Response
Authentication URL JSON file: {“user”:$user,“password”:$password} JSON file: {“result”:true/false,“info”:{…}}
User data URL JSON file: {“user”:$user} JSON file: {“result”:true/false,“info”:{“uid”:“dwho”,…}}
Password confirmation URL JSON file: {“user”:$user,“password”:$password} JSON file: {“result”:true/false}
Password change URL JSON file: {“user”:$user,“password”:$password} JSON file: {“result”:true/false}
To have only one call, you can set only REST authentication, set datas in “info” key response and set Null as User Database.