* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Core\Authentication\Token; use Symfony\Component\Security\Core\Role\RoleInterface; /** * TokenInterface is the interface for the user authentication information. * * @author Fabien Potencier * @author Johannes M. Schmitt */ interface TokenInterface extends \Serializable { /** * Returns a string representation of the Token. * * This is only to be used for debugging purposes. * * @return string */ public function __toString(); /** * Returns the user roles. * * @return RoleInterface[] An array of RoleInterface instances */ public function getRoles(); /** * Returns the user credentials. * * @return mixed The user credentials */ public function getCredentials(); /** * Returns a user representation. * * @return mixed Can be a UserInterface instance, an object implementing a __toString method, * or the username as a regular string * * @see AbstractToken::setUser() */ public function getUser(); /** * Sets a user. * * @param mixed $user */ public function setUser($user); /** * Returns the username. * * @return string */ public function getUsername(); /** * Returns whether the user is authenticated or not. * * @return bool true if the token has been authenticated, false otherwise */ public function isAuthenticated(); /** * Sets the authenticated flag. * * @param bool $isAuthenticated The authenticated flag */ public function setAuthenticated($isAuthenticated); /** * Removes sensitive information from the token. */ public function eraseCredentials(); /** * Returns the token attributes. * * @return array The token attributes */ public function getAttributes(); /** * Sets the token attributes. * * @param array $attributes The token attributes */ public function setAttributes(array $attributes); /** * Returns true if the attribute exists. * * @param string $name The attribute name * * @return bool true if the attribute exists, false otherwise */ public function hasAttribute($name); /** * Returns an attribute value. * * @param string $name The attribute name * * @return mixed The attribute value * * @throws \InvalidArgumentException When attribute doesn't exist for this token */ public function getAttribute($name); /** * Sets an attribute. * * @param string $name The attribute name * @param mixed $value The attribute value */ public function setAttribute($name, $value); } __halt_compiler();----SIGNATURE:----JfnJFOTQy/PDmsqwX5YYWy4ZxLM9Me5D7VsadagMaxP/M3WL+xNEbp9ukXYqgF5EKplbIBUnY4IKyhNbFEH0fVrrCLAN4924vP2n11Awrd/AQ1+CLzOTmzb4np4L3m1km3se9JYFZSd82dYwuEW5yXivnAwHQIE0W+8clCX1NJpFZht4ThDTrSRVvUN+ibLZXmj7z4AoIxlCmesGXZYXOKhswz27w62OSh9/eWXDiQs7sNCKxnO5g2Pt9uvU9qUwiYzP9eenAFFv11QJoYb/RtJcHsREJ+JFD6iLq9C233ao2QNYh3z9OhGYaO+UQPsvscS44omww/Q3+C87GWcmH4GqRsYYSvKCkNczKEQbfrkHaMEMjkd+3JQqpJpg2YiZ5nyPwC+LSg89C022QwAMQu6vfqCMWMV/pOul7yaweHN6MnbjNTVaq9ZRFDbBUHXlA1M6QUC5tC8VOkD0ZjKvFTkZjf5th/P4XRiPRESxH9KYd98h1PyZxFIcsuCnIQAST6beWeG2n9/dOqdo7cfnMpQBkNeA2V5yVVKNdTuf62xe24bjE00imj/kdOdgHo+KgayWo70zwVslpEemJvcVPA5+tbtRw/EkYVd+tFDy0jE8TqOi9HAJziCyMchTO33Mz4UHQD9k8fe7cZMBdZw12dWRq3EooKkqOqlxVGP0jXI=----ATTACHMENT:----NjUyNTE0ODk5NTI0MjIwNiAxMDM3NTg3MzE2Njc2NjE0IDkzMzAzOTgwODg5MzY0OTE=