Skip to content

Commit

Permalink
Composer.js and README.md have been modified.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sleon4 committed Mar 25, 2022
1 parent fc1fd87 commit e46f1ac
Show file tree
Hide file tree
Showing 15 changed files with 71 additions and 556 deletions.
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/vendor/
/public/
.env
composer.lock
/app/Server/
/app/Server/
.env
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ composer require lion-framework/lion-route
composer require lion-framework/lion-mailer
```

##### [Lion-Functions](https://github.com/Sleon4/Lion-Functions)
```powershell
composer require lion-framework/lion-functions
```

___

##### [PHRoute](https://github.com/mrjgreen/phroute)
```powershell
composer require phroute/phroute
Expand Down Expand Up @@ -68,9 +75,4 @@ composer require phpoffice/phpword
##### [Dompdf](https://github.com/dompdf/dompdf)
```powershell
composer require dompdf/dompdf
```

##### [Carbon](https://github.com/briannesbitt/Carbon)
```powershell
composer require nesbot/carbon
```
6 changes: 3 additions & 3 deletions app/Http/Controllers/Auth/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use App\Http\Functions\{ Security, AES, JWT, RSA };
use LionFunctions\{ SECURITY, AES, JWT, RSA };
use App\Models\Class\{ Request, Login };
use App\Models\Auth\LoginModel;

Expand All @@ -19,11 +19,11 @@ public function __construct() {
public function auth(): Request {
$aesDec = AES::decode(self::$request, 'AES_KEY', 'AES_IV');

if (Security::validate((array) $aesDec, Login::getValidate('LoginController', 'auth'))) {
if (SECURITY::validate((array) $aesDec, Login::getValidate('LoginController', 'auth'))) {
$this->login = new Login($aesDec->users_email, $aesDec->users_password);
$rsaDecode = RSA::decode((object) $this->loginModel->validateAccount($this->login));

if (Security::passwordVerify($this->login->getUsersPassword(), $rsaDecode->users_password)) {
if (SECURITY::passwordVerify($this->login->getUsersPassword(), $rsaDecode->users_password)) {
$idusersDB = $this->loginModel->readUserDataDB($this->login);
$idusers = AES::encode((object) $idusersDB, 'AES_KEY', 'AES_IV');

Expand Down
6 changes: 3 additions & 3 deletions app/Http/Controllers/Auth/RegisterController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use App\Http\Functions\{ Security, AES, RSA };
use LionFunctions\{ SECURITY, AES, RSA };
use App\Models\Auth\RegisterModel;
use App\Models\Class\{ Request, Users, DocumentTypes };

Expand All @@ -19,9 +19,9 @@ public function createUser() {
$aesDec = AES::decode(self::$request, 'AES_KEY', 'AES_IV');
$aesDec->iddocument_types = (int) $aesDec->iddocument_types;

if (Security::validate((array) $aesDec, Users::getValidate('RegisterController', 'createUser'))) {
if (SECURITY::validate((array) $aesDec, Users::getValidate('RegisterController', 'createUser'))) {
$rsaEnc = RSA::encode((object) [
'users_password' => Security::passwordHash($aesDec->users_password),
'users_password' => SECURITY::passwordHash($aesDec->users_password),
]);

$users = new Users(null, $aesDec->users_email, $rsaEnc->users_password, $aesDec->users_name, $aesDec->users_last_name, $aesDec->users_document, new DocumentTypes($aesDec->iddocument_types), $aesDec->users_phone);
Expand Down
35 changes: 0 additions & 35 deletions app/Http/Functions/AES.php

This file was deleted.

94 changes: 0 additions & 94 deletions app/Http/Functions/Excel.php

This file was deleted.

118 changes: 0 additions & 118 deletions app/Http/Functions/Files.php

This file was deleted.

46 changes: 0 additions & 46 deletions app/Http/Functions/JWT.php

This file was deleted.

Loading

0 comments on commit e46f1ac

Please sign in to comment.