mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-19 00:28:47 +02:00
N°8771 - Add Symfony form component to iTop core (#760)
- Add Symfony Form Component - Add Symfony CSRF security component - Add iTop default form template - Add Twig debug extension to Twig Environment - Add iTop abstract controller facility to get form builder - Add Twig filter to make trans an alias of dict_s filter
This commit is contained in:
61
lib/symfony/security-core/User/UserInterface.php
Normal file
61
lib/symfony/security-core/User/UserInterface.php
Normal file
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Security\Core\User;
|
||||
|
||||
/**
|
||||
* Represents the interface that all user classes must implement.
|
||||
*
|
||||
* This interface is useful because the authentication layer can deal with
|
||||
* the object through its lifecycle, assigning roles and so on.
|
||||
*
|
||||
* Regardless of how your users are loaded or where they come from (a database,
|
||||
* configuration, web service, etc.), you will have a class that implements
|
||||
* this interface. Objects that implement this interface are created and
|
||||
* loaded by different objects that implement UserProviderInterface.
|
||||
*
|
||||
* @see UserProviderInterface
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
interface UserInterface
|
||||
{
|
||||
/**
|
||||
* Returns the roles granted to the user.
|
||||
*
|
||||
* public function getRoles()
|
||||
* {
|
||||
* return ['ROLE_USER'];
|
||||
* }
|
||||
*
|
||||
* Alternatively, the roles might be stored in a ``roles`` property,
|
||||
* and populated in any number of different ways when the user object
|
||||
* is created.
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getRoles(): array;
|
||||
|
||||
/**
|
||||
* Removes sensitive data from the user.
|
||||
*
|
||||
* This is important if, at any given point, sensitive information like
|
||||
* the plain-text password is stored on this object.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function eraseCredentials();
|
||||
|
||||
/**
|
||||
* Returns the identifier for this user (e.g. username or email address).
|
||||
*/
|
||||
public function getUserIdentifier(): string;
|
||||
}
|
||||
Reference in New Issue
Block a user