十一月
10
2016

FOSUserBundle 中四种状态标识的含义说明

Security component in Symfony2 defines 4 flags related to the user. These are: enabled, locked, expired, credentialsExpired. Once the semantics of the two last of them seems to be easy to understand (the expired flag simply means that a user has been archived and the credentialsExpired flag means that a user needs to change his password), there are some concerns about the meaning of enabled and locked flags.

As Fabien Potencier, the founder of Symfony framework, claims, “this part of Symfony is a direct port of Spring Security, which was named Ageci some years ago”. There is old forum post about the original meaning of enabled and locked flags in Ageci. The following is being described:

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.

非特殊注明博文为 爱PHP吧(www.iphp8.com)原创内容,转载请注明原文地址:http://www.iphp8.com/?post=105

评论

发表评论:

(选填)

(选填)