amend source code header + fix read Header + add missing exception

This commit is contained in:
a-sansara 2017-03-13 20:37:22 +01:00
parent 685335992b
commit ba89e1d8bd
4 changed files with 31 additions and 7 deletions

View 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
{
}

View File

@ -1,6 +1,6 @@
<?php
/*
* This file is part of the PwsAuth package.
* This file is part of the pws-auth package.
*
* (c) meta-tech.academy
*
@ -251,12 +251,14 @@ class Authenticator
public function readHeader($arrHeaders)
{
$headers = [];
if (is_array($arrHeaders)) {
foreach($arrHeaders as $h) {
$rs = preg_split('/:/', $h);
if (count($rs)==2) {
$headers[$rs[0]] = trim($rs[1]);
}
}
}
return $headers;
}
}

View File

@ -1,6 +1,6 @@
<?php
/*
* This file is part of the PwsAuth package.
* This file is part of the pws-auth package.
*
* (c) meta-tech.academy
*

View File

@ -1,6 +1,6 @@
<?php
/*
* This file is part of the PwsAuth package.
* This file is part of the pws-auth package.
*
* (c) meta-tech.academy
*