API query and CI to build the docker demo image
Remove unused CI, removed some debugging for the demo
This commit is contained in:
@@ -18,6 +18,7 @@ class Server
|
||||
*/
|
||||
public function getBaseDN(): ?Collection
|
||||
{
|
||||
//findBaseDn()?
|
||||
// If the base is set in the configuration file, then just return that after validating it exists.
|
||||
// @todo
|
||||
if (false) {
|
||||
@@ -41,8 +42,6 @@ class Server
|
||||
protected function getDNAttrValues(string $dn,array $attrs=['*','+'],int $deref=LDAP_DEREF_NEVER): ?Entry
|
||||
{
|
||||
try {
|
||||
dump(config('ldap.connections.default.settings'));
|
||||
|
||||
return ($x=(new Adldap)
|
||||
->addProvider(config('ldap.connections.default.settings'))
|
||||
->search()
|
||||
@@ -54,4 +53,27 @@ class Server
|
||||
dd(['e'=>$e]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Query the server for a DN
|
||||
*
|
||||
* @param string $dn
|
||||
* @return |null
|
||||
*/
|
||||
public function query(string $dn)
|
||||
{
|
||||
try {
|
||||
return ($x=(new Adldap)
|
||||
->addProvider(config('ldap.connections.default.settings'))
|
||||
->search()
|
||||
->setBaseDn($dn)
|
||||
//->select($attrs)
|
||||
->listing()
|
||||
->get()) ? $x : NULL;
|
||||
|
||||
// @todo Tidy up this exception
|
||||
} catch (\Exception $e) {
|
||||
dd(['e'=>$e]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user