Adds composer and changes namespace

This commit is contained in:
Wojciech Burda
2019-10-09 19:25:08 +02:00
parent deec893aa3
commit b69256c7f8
9 changed files with 28 additions and 14 deletions
+2
View File
@@ -1 +1,3 @@
/nbproject/
/vendor/
+17
View File
@@ -0,0 +1,17 @@
{
"name": "kavalanche/security",
"description": "Security component for web applications",
"type": "library",
"authors": [
{
"name": "Wojtek",
"email": "w.lk@wp.pl"
}
],
"autoload": {
"psr-4": {
"Kavalanche\\Security\\": "src/"
}
},
"require": {}
}
+3 -6
View File
@@ -1,14 +1,11 @@
<?php
require __DIR__ . '/../vendor/autoload.php';
use App\Security\AuthenticationProvider;
use App\Security\UserProviderInMemory;
use Kavalanche\Security\AuthenticationProvider;
use Kavalanche\Security\UserProviderInMemory;
session_start();
require __DIR__ . '/../src/Security/UserProviderInMemory.php';
require __DIR__ . '/../src/Security/User.php';
require __DIR__ . '/../src/Security/AuthenticationProvider.php';
if (isset($_GET['logout'])) {
session_destroy();
header('Location: ?');
@@ -1,6 +1,6 @@
<?php
namespace App\Security;
namespace Kavalanche\Security;
use Exception;
Binary file not shown.
+1 -1
View File
@@ -1,6 +1,6 @@
<?php
namespace App\Security;
namespace Kavalanche\Security;
/**
* @author Wojciech Burda <wojciech.burda@rp.pl>
@@ -1,12 +1,10 @@
<?php
namespace App\Security;
namespace Kavalanche\Security;
use App\Security\User;
use App\Security\UserProviderInterface;
use Exception;
require __DIR__ . '/UserProviderInterface.php';
use Kavalanche\Security\User;
use Kavalanche\Security\UserProviderInterface;
/**
* @author Wojciech Burda <wojciech.burda@rp.pl>
@@ -1,6 +1,6 @@
<?php
namespace App\Security;
namespace Kavalanche\Security;
/**
* @author Wojciech Burda <wojciech.burda@rp.pl>
BIN
View File
Binary file not shown.