mirror of
https://github.com/Icinga/icingaweb2.git
synced 2026-05-28 04:02:39 -04:00
Add SPDX license headers and mark source files as GPL-3.0-or-later to preserve the option to relicense under later GPL versions.
58 lines
1.3 KiB
PHP
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();
|
|
}
|