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