Moved to new namespace
This commit is contained in:
parent
2ec85c469b
commit
75596ed725
3 changed files with 2 additions and 29 deletions
|
@ -103,26 +103,6 @@ class Resource extends Object
|
|||
|
||||
switch ($this->config['auth'][$_SERVER['__version']]['strategy'])
|
||||
{
|
||||
case 'basic':
|
||||
// @todo Check if Auth class has been implemented, if
|
||||
// not, fallback to the parent
|
||||
|
||||
// This class should be in the classes directory of the service
|
||||
$auth = '\\' . $this->config['pickles']['namespace'] . '\\Classes\\Auth';
|
||||
|
||||
// Strips preceding slashs when there is no namespace
|
||||
if (strpos($auth, '\\\\') === 0)
|
||||
{
|
||||
$auth = substr($auth, 2);
|
||||
}
|
||||
|
||||
// @todo Custom method
|
||||
if (!$auth::basic())
|
||||
{
|
||||
throw new \Exception('Invalid authentication credentials.', 401);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new \Exception('Invalid authentication strategy.', 401);
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue