Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
2b098ba9
Commit
2b098ba9
authored
Nov 09, 2015
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(auth) add api auth to auth factory
parent
b40a2e8a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
AuthenticationFactory.php
...e/mvc/app/library/OPNsense/Auth/AuthenticationFactory.php
+4
-0
No files found.
src/opnsense/mvc/app/library/OPNsense/Auth/AuthenticationFactory.php
View file @
2b098ba9
...
@@ -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
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment