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 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”).

URL 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 just one call, you can only set REST authentication, set datas in “info” key response and set Null as User Database.