11# Auth User PHP
22
3- [ ![ Opensource ByJG] ( https://img.shields.io/badge/opensource-byjg.com-brightgreen.svg )] ( http://opensource.byjg.com )
3+ [ ![ Opensource ByJG] ( https://img.shields.io/badge/opensource-byjg-success.svg )] ( http://opensource.byjg.com )
4+ [ ![ GitHub source] ( https://img.shields.io/badge/Github-source-informational?logo=github )] ( https://github.com/byjg/authuser/ )
5+ [ ![ GitHub license] ( https://img.shields.io/github/license/byjg/authuser.svg )] ( https://opensource.byjg.com/opensource/licensing.html )
6+ [ ![ GitHub release] ( https://img.shields.io/github/release/byjg/authuser.svg )] ( https://github.com/byjg/authuser/releases/ )
47[ ![ SensioLabsInsight] ( https://insight.sensiolabs.com/projects/69f04d22-055d-40b5-8c8d-90598a5367b5/mini.png )] ( https://insight.sensiolabs.com/projects/69f04d22-055d-40b5-8c8d-90598a5367b5 )
58[ ![ Scrutinizer Code Quality] ( https://scrutinizer-ci.com/g/byjg/authuser/badges/quality-score.png?b=master )] ( https://scrutinizer-ci.com/g/byjg/authuser/?branch=master )
6- [ ![ Build Status] ( https://travis-ci.org /byjg/authuser.svg?branch=master )] ( https://travis-ci.org /byjg/authuser )
9+ [ ![ Build Status] ( https://travis-ci.com /byjg/authuser.svg?branch=master )] ( https://travis-ci.com /byjg/authuser )
710
811
912A simple and customizable class for enable user authentication inside your application. It is available on XML files, Relational Databases and Moodle.
1013
1114The main purpose is just to handle all complexity of validate a user, add properties and create access token abstracting the database layer.
1215This class can persist into session (or file, memcache, etc) the user data between requests.
1316
14- # Examples
15-
1617## Creating a Users handling class
1718
1819
@@ -136,7 +137,7 @@ $sessionContext = new \ByJG\Authenticate\SessionContext(\ByJG\Cache\Factory::cre
136137If you do not know to create/manage that unique prefix ** prefer to use the regular Session object.**
137138
138139
139- # Architecture
140+ ## Architecture
140141
141142```
142143 +----------------+ +----------------+
@@ -156,7 +157,7 @@ If you do not know to create/manage that unique prefix **prefer to use the regul
156157 +-----------------+ +----------------+ +--------------------+
157158```
158159
159- ## Database
160+ ### Database
160161
161162The default structure adopted for store the user data in the database through the
162163UsersDBDataset class is the follow:
@@ -200,7 +201,7 @@ $users = new ByJG\Authenticate\UsersDBDataset(
200201);
201202```
202203
203- ## Custom Database
204+ ### Custom Database
204205
205206If you have an existing database with different names but containing all fields above
206207you can use the UserDefinition and UserPropertiesDefinition classes for customize this info.
@@ -223,7 +224,7 @@ $userDefinition = new \ByJG\Authenticate\Definition\UserDefinition(
223224);
224225```
225226
226- ## Adding custom modifiers for read and update
227+ ### Adding custom modifiers for read and update
227228
228229``` php
229230<?php
@@ -253,7 +254,7 @@ $userDefinition->markPropertyAsReadOnly('created');
253254```
254255
255256
256- # Extending UserModel
257+ ## Extending UserModel
257258
258259It is possible extending the UserModel table, since you create a new class extending from UserModel to add the new fields.
259260
@@ -307,15 +308,15 @@ $users = new ByJG\Authenticate\UsersDBDataset(
307308
308309
309310
310- # Install
311+ ## Install
311312
312313Just type:
313314
314315```
315- composer require "byjg/authuser=4.1 .*"
316+ composer require "byjg/authuser=4.3 .*"
316317```
317318
318- # Running Tests
319+ ## Running Tests
319320
320321Because this project uses PHP Session you need to run the unit test the following manner:
321322
0 commit comments