From 954fdfdfc06d287daf9d05b1e47af52be68938a9 Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Fri, 20 Jun 2014 13:25:31 +0000 Subject: [PATCH] Add Authorization in docs git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1478 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- docs/USAGE | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/USAGE b/docs/USAGE index 4732872..1b533ce 100644 --- a/docs/USAGE +++ b/docs/USAGE @@ -198,6 +198,24 @@ The fields are defined by : The CSRF parameter is verify automatically when using $f->values (); In case of error, an exception is raised. +10. Authentication / Authorization +---------------------------------- +The Authentication/Authorization module permits to allow/deny access to objects. +The user must be validated before using a information. It is based on Unix +model, with users/groups/modbits, files (objects) with owner/group/modbits. +To do that, you can use a table in your database: + $auth = new authorizationdb (); + $auth->connectdb ($this->database["dsn"], $this->database["username"], + $this->database["password"], + $this->database["driver_options"]); +Then add the objects with the rights : + $auth->add ("/module/", $auth->authiduser, + reset ($auth->authgroups), 0755); +You can remove the objects with : + $auth->del ("/module/"); +You can see if the user can access to the object with READ, WRITE, EXECUTE : + $auth->validate ("/module/") + XX. CLI usage ------------- The DomFramework is designed to be used in console line too.