mirror of
https://github.com/ZeJMaN/LBCAlerte_ynh.git
synced 2025-07-06 11:50:48 +02:00
Initial commit
Functional, without SSO
This commit is contained in:
19
sources/lib/Auth/Basic.php
Normal file
19
sources/lib/Auth/Basic.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace Auth;
|
||||
|
||||
require_once __DIR__."/Abstract.php";
|
||||
|
||||
class Basic extends AuthAbstract
|
||||
{
|
||||
public function __construct(\App\Storage\User $storage)
|
||||
{
|
||||
if (!$this->_username && isset($_SERVER["PHP_AUTH_USER"])) {
|
||||
$this->setUsername($_SERVER["PHP_AUTH_USER"]);
|
||||
}
|
||||
if (!$this->_password && isset($_SERVER["PHP_AUTH_PW"])) {
|
||||
$this->setPassword(sha1($_SERVER["PHP_AUTH_PW"]));
|
||||
}
|
||||
parent::__construct($storage);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user