icingaweb2/library/Icinga/Authentication/UserGroup/UserGroupBackendInterface.php
Eric Lippmann 662de28f85 License source files as GPL-3.0-or-later
Add SPDX license headers and mark source files as GPL-3.0-or-later to
preserve the option to relicense under later GPL versions.
2026-03-26 17:49:26 +01:00

58 lines
1.3 KiB
PHP

<?php
// SPDX-FileCopyrightText: 2018 Icinga GmbH <https://icinga.com>
// SPDX-License-Identifier: GPL-3.0-or-later
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);
/**
* 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);
/**
* 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();
}