2015-05-05 02:27:11 -04:00
|
|
|
<?php
|
2026-03-26 12:46:27 -04:00
|
|
|
|
|
|
|
|
// SPDX-FileCopyrightText: 2018 Icinga GmbH <https://icinga.com>
|
|
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
2015-05-05 02:27:11 -04:00
|
|
|
|
|
|
|
|
namespace Icinga\Authentication\UserGroup;
|
|
|
|
|
|
|
|
|
|
use Icinga\User;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Interface for user group backends
|
|
|
|
|
*/
|
|
|
|
|
interface UserGroupBackendInterface
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Set this backend's name
|
|
|
|
|
*
|
|
|
|
|
* @param string $name
|
|
|
|
|
*
|
|
|
|
|
* @return $this
|
|
|
|
|
*/
|
|
|
|
|
public function setName($name);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Return this backend's name
|
|
|
|
|
*
|
|
|
|
|
* @return string
|
|
|
|
|
*/
|
|
|
|
|
public function getName();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Return the groups the given user is a member of
|
|
|
|
|
*
|
|
|
|
|
* @param User $user
|
|
|
|
|
*
|
|
|
|
|
* @return array
|
|
|
|
|
*/
|
|
|
|
|
public function getMemberships(User $user);
|
2015-10-15 09:28:03 -04:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Return the name of the backend that is providing the given user
|
|
|
|
|
*
|
|
|
|
|
* @param string $username
|
|
|
|
|
*
|
|
|
|
|
* @return null|string The name of the backend or null in case this information is not available
|
|
|
|
|
*/
|
|
|
|
|
public function getUserBackendName($username);
|
2021-06-02 04:55:57 -04:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Return this backend's configuration form class path
|
|
|
|
|
*
|
|
|
|
|
* This is not part of the interface to not break existing implementations.
|
|
|
|
|
* If you need a custom backend form, implement this method.
|
|
|
|
|
*
|
|
|
|
|
* @return string
|
|
|
|
|
*/
|
|
|
|
|
//public static function getConfigurationFormClass();
|
2015-05-05 02:27:11 -04:00
|
|
|
}
|