比较从的UserInterface类
interface UserInterface {
/**
* The equality comparison should neither be done by referential equality
* nor by comparing identities (i.e. getId() === getId()).
*
* However, you do not need to compare every attribute, but only those that
* are relevant for assessing whether re-authentication is required.
*
* @param UserInterface $user
* @return Boolean
*/
function equals(UserInterface $user);
}
我应该如何实现这个(“那些相关的评估是否重新认证是必需的” )?那么这是否意味着在Symfony 2重新认证(用户名/密码)后用户?或者是这个功能用户重新认证。我可以检查id, username, password, salt
吗? Symfony不会通过密码检查重新验证用户,这应该足够了吗?
伟大的答案,但在我的经验,我不会考虑用户密码更改为理由重新验证:)只是我的2美分那里... – Prof83