弹簧安全性:帐户锁定和未启用有什么区别
2022-09-01 19:19:47
“用户详细信息”界面有两个看似相同的属性:锁定和启用。
这些不就是另一个的对立面吗?
“用户详细信息”界面有两个看似相同的属性:锁定和启用。
这些不就是另一个的对立面吗?
在旧的Acegi博客上找到这个 - 希望它有帮助
Disabled indicates an account has been administratively or automatically disabled for some reason. Usually some action is required to release it.
Locked indicates an account has been automatically suspended due to invalid login attempts. Usually the passage of time or (less often) requesting manual unlocking is required to release it.
The distinction is not used by Acegi Security code aside from providing more informative errors to the user. There is also an order in which different exceptions should be returned, so that a disabled or locked account for instance will not return a bad credentials exception. Refer to the JavaDocs for more details.