Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simplesamlphp
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Perun
Perun ProxyIdP
v1
simplesamlphp
Commits
3cacf845
Commit
3cacf845
authored
9 years ago
by
Matt Schwager
Browse files
Options
Downloads
Patches
Plain Diff
Allow specifying the LDAP port used from the configuration file.
parent
266e5c75
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
config-templates/authsources.php
+4
-0
4 additions, 0 deletions
config-templates/authsources.php
modules/ldap/lib/ConfigHelper.php
+11
-3
11 additions, 3 deletions
modules/ldap/lib/ConfigHelper.php
with
15 additions
and
3 deletions
config-templates/authsources.php
+
4
−
0
View file @
3cacf845
...
...
@@ -276,6 +276,10 @@ $config = array(
// The default is 0, which means no timeout.
'timeout' => 0,
// The port used when accessing the LDAP server.
// The default is 389.
'port' => 389,
// Set whether to follow referrals. AD Controllers may require FALSE to function.
'referrals' => TRUE,
...
...
This diff is collapsed.
Click to expand it.
modules/ldap/lib/ConfigHelper.php
+
11
−
3
View file @
3cacf845
...
...
@@ -45,6 +45,13 @@ class sspmod_ldap_ConfigHelper {
*/
private
$timeout
;
/**
* The port used when accessing the LDAP server.
*
* @var int
*/
private
$port
;
/**
* Whether to follow referrals
*/
...
...
@@ -130,6 +137,7 @@ class sspmod_ldap_ConfigHelper {
$this
->
enableTLS
=
$config
->
getBoolean
(
'enable_tls'
,
FALSE
);
$this
->
debug
=
$config
->
getBoolean
(
'debug'
,
FALSE
);
$this
->
timeout
=
$config
->
getInteger
(
'timeout'
,
0
);
$this
->
port
=
$config
->
getInteger
(
'port'
,
389
);
$this
->
referrals
=
$config
->
getBoolean
(
'referrals'
,
TRUE
);
$this
->
searchEnable
=
$config
->
getBoolean
(
'search.enable'
,
FALSE
);
$this
->
privRead
=
$config
->
getBoolean
(
'priv.read'
,
FALSE
);
...
...
@@ -177,7 +185,7 @@ class sspmod_ldap_ConfigHelper {
throw
new
SimpleSAML_Error_Error
(
'WRONGUSERPASS'
);
}
$ldap
=
new
SimpleSAML_Auth_LDAP
(
$this
->
hostname
,
$this
->
enableTLS
,
$this
->
debug
,
$this
->
timeout
,
389
,
$this
->
referrals
);
$ldap
=
new
SimpleSAML_Auth_LDAP
(
$this
->
hostname
,
$this
->
enableTLS
,
$this
->
debug
,
$this
->
timeout
,
$this
->
port
,
$this
->
referrals
);
if
(
!
$this
->
searchEnable
)
{
$ldapusername
=
addcslashes
(
$username
,
',+"\\<>;*'
);
...
...
@@ -245,7 +253,7 @@ class sspmod_ldap_ConfigHelper {
$this
->
enableTLS
,
$this
->
debug
,
$this
->
timeout
,
389
,
$this
->
port
,
$this
->
referrals
);
if
(
$attribute
==
NULL
)
...
...
@@ -269,7 +277,7 @@ class sspmod_ldap_ConfigHelper {
$this
->
enableTLS
,
$this
->
debug
,
$this
->
timeout
,
389
,
$this
->
port
,
$this
->
referrals
);
/* Are privs needed to get the attributes? */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment