比較從的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