Commit 2b098ba9 authored by Ad Schellevis's avatar Ad Schellevis

(auth) add api auth to auth factory

parent b40a2e8a
...@@ -66,6 +66,7 @@ class AuthenticationFactory ...@@ -66,6 +66,7 @@ class AuthenticationFactory
{ {
$servers = array(); $servers = array();
$servers['Local Database'] = array("name" => "Local Database", "type" => "local"); $servers['Local Database'] = array("name" => "Local Database", "type" => "local");
$servers['Local API'] = array("name" => "Local API Database", "type" => "api");
$configObj = Config::getInstance()->object(); $configObj = Config::getInstance()->object();
foreach ($configObj->system->children() as $key => $value) { foreach ($configObj->system->children() as $key => $value) {
if ($key == 'authserver' && !empty($value->type) && !empty($value->name)) { if ($key == 'authserver' && !empty($value->type) && !empty($value->name)) {
...@@ -106,6 +107,9 @@ class AuthenticationFactory ...@@ -106,6 +107,9 @@ class AuthenticationFactory
case 'voucher': case 'voucher':
$authObject = new Voucher(); $authObject = new Voucher();
break; break;
case 'api':
$authObject = new API();
break;
default: default:
$authObject = null; $authObject = null;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment