aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/lib/IUserLDAP.php
blob: 5e8e29c3adf0d4284cea7d3dc0cd456c124cb36b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php

/**
 * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */
namespace OCA\User_LDAP;

interface IUserLDAP {

	//Functions used by LDAPProvider

	/**
	 * Return access for LDAP interaction.
	 * @param string $uid
	 * @return Access instance of Access for LDAP interaction
	 */
	public function getLDAPAccess($uid);

	/**
	 * Return a new LDAP connection for the specified user.
	 * @param string $uid
	 * @return \LDAP\Connection of the LDAP connection
	 */
	public function getNewLDAPConnection($uid);

	/**
	 * Return the username for the given LDAP DN, if available.
	 * @param string $dn
	 * @return string|false with the username
	 */
	public function dn2UserName($dn);
}