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
e0585398
Commit
e0585398
authored
Oct 26, 2015
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(auth) style cleanups
parent
a8fa4e5a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
14 deletions
+16
-14
AuthenticationFactory.php
...e/mvc/app/library/OPNsense/Auth/AuthenticationFactory.php
+3
-1
IAuthConnector.php
...opnsense/mvc/app/library/OPNsense/Auth/IAuthConnector.php
+2
-2
LDAP.php
src/opnsense/mvc/app/library/OPNsense/Auth/LDAP.php
+9
-9
Local.php
src/opnsense/mvc/app/library/OPNsense/Auth/Local.php
+2
-2
No files found.
src/opnsense/mvc/app/library/OPNsense/Auth/AuthenticationFactory.php
View file @
e0585398
...
@@ -39,6 +39,8 @@ class AuthenticationFactory
...
@@ -39,6 +39,8 @@ class AuthenticationFactory
{
{
/**
/**
* search already known local userDN's into simple mapping if auth method is current standard method
* search already known local userDN's into simple mapping if auth method is current standard method
* @param string $authserver auth server name
* @return array list of dn's
*/
*/
private
function
fetchUserDNs
(
$authserver
=
null
)
private
function
fetchUserDNs
(
$authserver
=
null
)
{
{
...
@@ -80,7 +82,7 @@ class AuthenticationFactory
...
@@ -80,7 +82,7 @@ class AuthenticationFactory
/**
/**
* get new authenticator
* get new authenticator
* @param $authserver authentication server name
* @param
string
$authserver authentication server name
* @return IAuthConnector|null
* @return IAuthConnector|null
*/
*/
public
function
get
(
$authserver
)
public
function
get
(
$authserver
)
...
...
src/opnsense/mvc/app/library/OPNsense/Auth/IAuthConnector.php
View file @
e0585398
...
@@ -49,8 +49,8 @@ interface IAuthConnector
...
@@ -49,8 +49,8 @@ interface IAuthConnector
/**
/**
* authenticate user
* authenticate user
* @param $username username to authenticate
* @param
string
$username username to authenticate
* @param $password user password
* @param
string
$password user password
* @return bool
* @return bool
*/
*/
public
function
authenticate
(
$username
,
$password
);
public
function
authenticate
(
$username
,
$password
);
...
...
src/opnsense/mvc/app/library/OPNsense/Auth/LDAP.php
View file @
e0585398
...
@@ -109,7 +109,7 @@ class LDAP implements IAuthConnector
...
@@ -109,7 +109,7 @@ class LDAP implements IAuthConnector
/**
/**
* search ldap tree
* search ldap tree
* @param $filter ldap filter string to use
* @param
string
$filter ldap filter string to use
* @param string $ldap_scope scope either one or tree
* @param string $ldap_scope scope either one or tree
* @return array|bool result list or false on errors
* @return array|bool result list or false on errors
*/
*/
...
@@ -144,7 +144,7 @@ class LDAP implements IAuthConnector
...
@@ -144,7 +144,7 @@ class LDAP implements IAuthConnector
/**
/**
* construct a new LDAP connector
* construct a new LDAP connector
* @param null $baseSearchDN setup base searchDN or list of DN's separated by ;
* @param null
|string
$baseSearchDN setup base searchDN or list of DN's separated by ;
* @param int $ldapVersion setup ldap version
* @param int $ldapVersion setup ldap version
*/
*/
public
function
__construct
(
$baseSearchDN
=
null
,
$ldapVersion
=
3
)
public
function
__construct
(
$baseSearchDN
=
null
,
$ldapVersion
=
3
)
...
@@ -201,8 +201,8 @@ class LDAP implements IAuthConnector
...
@@ -201,8 +201,8 @@ class LDAP implements IAuthConnector
/**
/**
* initiate a connection.
* initiate a connection.
* @param $bind_url string url to use
* @param $bind_url string url to use
* @param null $userdn connect dn to use, leave empty for anonymous
* @param null
|string
$userdn connect dn to use, leave empty for anonymous
* @param null $password password
* @param null
|string
$password password
* @param int $timeout network timeout
* @param int $timeout network timeout
* @return bool connect status (success/fail)
* @return bool connect status (success/fail)
*/
*/
...
@@ -228,9 +228,9 @@ class LDAP implements IAuthConnector
...
@@ -228,9 +228,9 @@ class LDAP implements IAuthConnector
/**
/**
* search user by name or expression
* search user by name or expression
* @param
$username string
username(s) to search
* @param
string $username
username(s) to search
* @param
$userNameAttribute string
ldap attribute to use for the search
* @param
string $userNameAttribute
ldap attribute to use for the search
* @param
$extendedQuery string|null
additional search criteria (narrow down search)
* @param
string|null $extendedQuery
additional search criteria (narrow down search)
* @return array|bool
* @return array|bool
*/
*/
public
function
searchUsers
(
$username
,
$userNameAttribute
,
$extendedQuery
=
null
)
public
function
searchUsers
(
$username
,
$userNameAttribute
,
$extendedQuery
=
null
)
...
@@ -297,8 +297,8 @@ class LDAP implements IAuthConnector
...
@@ -297,8 +297,8 @@ class LDAP implements IAuthConnector
/**
/**
* authenticate user against ldap server
* authenticate user against ldap server
* @param $username username to authenticate
* @param
string
$username username to authenticate
* @param $password user password
* @param
string
$password user password
* @return bool authentication status
* @return bool authentication status
*/
*/
public
function
authenticate
(
$username
,
$password
)
public
function
authenticate
(
$username
,
$password
)
...
...
src/opnsense/mvc/app/library/OPNsense/Auth/Local.php
View file @
e0585398
...
@@ -57,8 +57,8 @@ class Local implements IAuthConnector
...
@@ -57,8 +57,8 @@ class Local implements IAuthConnector
/**
/**
* authenticate user against local database (in config.xml)
* authenticate user against local database (in config.xml)
* @param $username username to authenticate
* @param
string
$username username to authenticate
* @param $password user password
* @param
string
$password user password
* @return bool authentication status
* @return bool authentication status
*/
*/
public
function
authenticate
(
$username
,
$password
)
public
function
authenticate
(
$username
,
$password
)
...
...
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