amend source code header + fix read Header + add missing exception
This commit is contained in:
parent
685335992b
commit
ba89e1d8bd
22
src/MetaTech/PwsAuth/AuthenticateException.php
Normal file
22
src/MetaTech/PwsAuth/AuthenticateException.php
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* This file is part of the pws-auth package.
|
||||||
|
*
|
||||||
|
* (c) meta-tech.academy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
namespace MetaTech\PwsAuth;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* @package MetaTech\PwsAuth
|
||||||
|
* @package AuthenticateException
|
||||||
|
* @extends Exception
|
||||||
|
* @author a-Sansara
|
||||||
|
* @date 2017-03-13 18:51:46 CET
|
||||||
|
*/
|
||||||
|
class AuthenticateException extends \Exception
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* This file is part of the PwsAuth package.
|
* This file is part of the pws-auth package.
|
||||||
*
|
*
|
||||||
* (c) meta-tech.academy
|
* (c) meta-tech.academy
|
||||||
*
|
*
|
||||||
|
@ -251,12 +251,14 @@ class Authenticator
|
||||||
public function readHeader($arrHeaders)
|
public function readHeader($arrHeaders)
|
||||||
{
|
{
|
||||||
$headers = [];
|
$headers = [];
|
||||||
|
if (is_array($arrHeaders)) {
|
||||||
foreach($arrHeaders as $h) {
|
foreach($arrHeaders as $h) {
|
||||||
$rs = preg_split('/:/', $h);
|
$rs = preg_split('/:/', $h);
|
||||||
if (count($rs)==2) {
|
if (count($rs)==2) {
|
||||||
$headers[$rs[0]] = trim($rs[1]);
|
$headers[$rs[0]] = trim($rs[1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return $headers;
|
return $headers;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* This file is part of the PwsAuth package.
|
* This file is part of the pws-auth package.
|
||||||
*
|
*
|
||||||
* (c) meta-tech.academy
|
* (c) meta-tech.academy
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* This file is part of the PwsAuth package.
|
* This file is part of the pws-auth package.
|
||||||
*
|
*
|
||||||
* (c) meta-tech.academy
|
* (c) meta-tech.academy
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue
Block a user