Skip to content
Snippets Groups Projects
Commit 7036c5e7 authored by Tim van Dijen's avatar Tim van Dijen
Browse files

Fixes for modules/ldap

parent 7307305c
Branches
Tags
No related merge requests found
...@@ -34,7 +34,6 @@ namespace SimpleSAML\Module\ldap\Auth\Process; ...@@ -34,7 +34,6 @@ namespace SimpleSAML\Module\ldap\Auth\Process;
* @author Remy Blom <remy.blom@hku.nl> * @author Remy Blom <remy.blom@hku.nl>
* @package SimpleSAMLphp * @package SimpleSAMLphp
*/ */
class AttributeAddFromLDAP extends BaseFilter class AttributeAddFromLDAP extends BaseFilter
{ {
/** /**
...@@ -60,6 +59,7 @@ class AttributeAddFromLDAP extends BaseFilter ...@@ -60,6 +59,7 @@ class AttributeAddFromLDAP extends BaseFilter
*/ */
protected $attr_policy; protected $attr_policy;
/** /**
* Initialize this filter. * Initialize this filter.
* *
...@@ -136,6 +136,7 @@ class AttributeAddFromLDAP extends BaseFilter ...@@ -136,6 +136,7 @@ class AttributeAddFromLDAP extends BaseFilter
* Add attributes from an LDAP server. * Add attributes from an LDAP server.
* *
* @param array &$request The current request * @param array &$request The current request
* @return void
*/ */
public function process(&$request) public function process(&$request)
{ {
......
...@@ -10,7 +10,6 @@ namespace SimpleSAML\Module\ldap\Auth\Process; ...@@ -10,7 +10,6 @@ namespace SimpleSAML\Module\ldap\Auth\Process;
* @author Ryan Panning <panman@traileyes.com> * @author Ryan Panning <panman@traileyes.com>
* @package SimpleSAMLphp * @package SimpleSAMLphp
*/ */
class AttributeAddUsersGroups extends BaseFilter class AttributeAddUsersGroups extends BaseFilter
{ {
/** /**
...@@ -21,6 +20,7 @@ class AttributeAddUsersGroups extends BaseFilter ...@@ -21,6 +20,7 @@ class AttributeAddUsersGroups extends BaseFilter
* *
* @throws \SimpleSAML\Error\Exception * @throws \SimpleSAML\Error\Exception
* @param $request * @param $request
* @return void
*/ */
public function process(&$request) public function process(&$request)
{ {
......
...@@ -14,7 +14,6 @@ namespace SimpleSAML\Module\ldap\Auth\Process; ...@@ -14,7 +14,6 @@ namespace SimpleSAML\Module\ldap\Auth\Process;
* @author Remy Blom <remy.blom@hku.nl> * @author Remy Blom <remy.blom@hku.nl>
* @package SimpleSAMLphp * @package SimpleSAMLphp
*/ */
abstract class BaseFilter extends \SimpleSAML\Auth\ProcessingFilter abstract class BaseFilter extends \SimpleSAML\Auth\ProcessingFilter
{ {
/** /**
...@@ -50,7 +49,7 @@ abstract class BaseFilter extends \SimpleSAML\Auth\ProcessingFilter ...@@ -50,7 +49,7 @@ abstract class BaseFilter extends \SimpleSAML\Auth\ProcessingFilter
* Instance, object of the ldap connection. Stored here to * Instance, object of the ldap connection. Stored here to
* be access later during processing. * be access later during processing.
* *
* @var \SimpleSAML\Auth\Ldap * @var \SimpleSAML\Auth\LDAP
*/ */
private $ldap; private $ldap;
...@@ -90,8 +89,8 @@ abstract class BaseFilter extends \SimpleSAML\Auth\ProcessingFilter ...@@ -90,8 +89,8 @@ abstract class BaseFilter extends \SimpleSAML\Auth\ProcessingFilter
* instance/object and stores everything in class members. * instance/object and stores everything in class members.
* *
* @throws \SimpleSAML\Error\Exception * @throws \SimpleSAML\Error\Exception
* @param array $config * @param array &$config
* @param $reserved * @param mixed $reserved
*/ */
public function __construct(&$config, $reserved) public function __construct(&$config, $reserved)
{ {
...@@ -255,12 +254,12 @@ abstract class BaseFilter extends \SimpleSAML\Auth\ProcessingFilter ...@@ -255,12 +254,12 @@ abstract class BaseFilter extends \SimpleSAML\Auth\ProcessingFilter
* rather than setting in the constructor to avoid unnecessarily * rather than setting in the constructor to avoid unnecessarily
* connecting to LDAP when it might not be needed. * connecting to LDAP when it might not be needed.
* *
* @return \SimpleSAML\Auth\Ldap * @return \SimpleSAML\Auth\LDAP
*/ */
protected function getLdap() protected function getLdap()
{ {
// Check if already connected // Check if already connected
if ($this->ldap) { if (isset($this->ldap)) {
return $this->ldap; return $this->ldap;
} }
......
...@@ -253,7 +253,7 @@ class ConfigHelper ...@@ -253,7 +253,7 @@ class ConfigHelper
* @param bool $allowZeroHits * @param bool $allowZeroHits
* Determines if the method will throw an exception if no * Determines if the method will throw an exception if no
* hits are found. Defaults to FALSE. * hits are found. Defaults to FALSE.
* @return string * @return string|null
* The DN of the matching element, if found. If no element was * The DN of the matching element, if found. If no element was
* found and $allowZeroHits is set to FALSE, an exception will * found and $allowZeroHits is set to FALSE, an exception will
* be thrown; otherwise NULL will be returned. * be thrown; otherwise NULL will be returned.
...@@ -295,6 +295,13 @@ class ConfigHelper ...@@ -295,6 +295,13 @@ class ConfigHelper
); );
} }
/**
* @param string $dn
* @param array|null $attributes
* @return array
* @throws \Exception
*/
public function getAttributes($dn, $attributes = null) public function getAttributes($dn, $attributes = null)
{ {
if ($attributes == null) { if ($attributes == null) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment