mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 16:14:40 +00:00
(auth) add api auth to auth factory
This commit is contained in:
parent
b40a2e8a94
commit
2b098ba9da
@ -66,6 +66,7 @@ class AuthenticationFactory
|
||||
{
|
||||
$servers = array();
|
||||
$servers['Local Database'] = array("name" => "Local Database", "type" => "local");
|
||||
$servers['Local API'] = array("name" => "Local API Database", "type" => "api");
|
||||
$configObj = Config::getInstance()->object();
|
||||
foreach ($configObj->system->children() as $key => $value) {
|
||||
if ($key == 'authserver' && !empty($value->type) && !empty($value->name)) {
|
||||
@ -106,6 +107,9 @@ class AuthenticationFactory
|
||||
case 'voucher':
|
||||
$authObject = new Voucher();
|
||||
break;
|
||||
case 'api':
|
||||
$authObject = new API();
|
||||
break;
|
||||
default:
|
||||
$authObject = null;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user