|
6 | 6 | [](https://opensource.byjg.com/opensource/licensing.html) |
7 | 7 | [](https://github.com/byjg/php-authuser/releases/) |
8 | 8 |
|
9 | | -A simple and customizable class for enable user authentication inside your application. It is available on XML files, Relational Databases and Moodle. |
| 9 | +A simple and customizable class for enable user authentication inside your application. It is available on XML files, Relational Databases. |
10 | 10 |
|
11 | 11 | The main purpose is just to handle all complexity of validate a user, add properties and create access token abstracting the database layer. |
12 | 12 | This class can persist into session (or file, memcache, etc) the user data between requests. |
@@ -34,27 +34,6 @@ $users = new ByJG\Authenticate\UsersDBDataset( |
34 | 34 | *Note*: See the [Anydataset project](https://github.com/byjg/anydataset#connection-based-on-uri) to see the |
35 | 35 | database available and the connection strings as well. |
36 | 36 |
|
37 | | -Using the Moodle as the user storage: |
38 | | - |
39 | | -```php |
40 | | -<?php |
41 | | -$users = new UsersMoodleDataset('connection'); |
42 | | -``` |
43 | | - |
44 | | -## Authenticate a user with your username and password and persist into the session |
45 | | - |
46 | | -```php |
47 | | -<?php |
48 | | -$user = $users->isValidUser('someuser', '12345'); |
49 | | -if (!is_null($user)) |
50 | | -{ |
51 | | - $userId = $user->getUserid(); |
52 | | - |
53 | | - $sessionContext = new \ByJG\Authenticate\SessionContext(\ByJG\Cache\Factory::createSessionPool()); |
54 | | - $sessionContext->registerLogin($userId); |
55 | | -} |
56 | | -``` |
57 | | - |
58 | 37 | ## Check if user was previously authenticated |
59 | 38 |
|
60 | 39 | ```php |
@@ -151,14 +130,13 @@ If you do not know to create/manage that unique prefix **prefer to use the regul |
151 | 130 | │ │ │ |
152 | 131 | │ │ │ |
153 | 132 | ┌───────────────────┐ ┌───────────────────┐ ┌────────────────────┐ |
154 | | - │ UsersAnyDataset │ │ UsersDBDataset │ │ UsersMoodleDataset │ |
| 133 | + │ UsersAnyDataset │ │ UsersDBDataset │ │ xxxxxxxxxxxxxxxxxx │ |
155 | 134 | └───────────────────┘ └───────────────────┘ └────────────────────┘ |
156 | 135 | ``` |
157 | 136 |
|
158 | 137 | - UserInterface contain the basic interface for the concrete implementation |
159 | 138 | - UsersDBDataset is a concrete implementation to retrieve/save user in a Database |
160 | 139 | - UserAnyDataset is a concrete implementation to retrieve/save user in a Xml file |
161 | | -- UsersMoodleDatabase is a concrete implementation to retrieve users in a Moodle database structure. |
162 | 140 | - UserModel is the basic model get/set for the user |
163 | 141 | - UserPropertyModel is the basic model get/set for extra user property |
164 | 142 | - UserDefinition will map the model to the database |
|
0 commit comments