What is the point of AutoLogin?
Miles Johnson just updated his CakePHP AutoLogin Plugin, and although I am grateful for his work and contributions, I seem to miss the point: what is the difference, or why is it better than just having a long duration session cooki开发者_StackOverflowe set by CakePHP?
Well lets see here, the AutoLogin script remembers the users login information for x amount of time. You can set this cookie for a year if you want, do you really want to do that for a session? And lastly, this gives the user the option of wanting to stay persistently logged in. I am not aware of a way to do that with extended session times.
that is exactly what it does, https://github.com/milesj/cake-auto_login/blob/master/controllers/components/auto_login.php#L202
also does this over and above just a long running cookie
- Requires no installation except for adding the checkbox into your user login forms
- Automatically saves the cookie and info when a user logs in
- Automatically kills the cookie and session when a user logs out
- Inserts a hash within the cookie so that it cannot be hijacked
- Encrypts the cookie so the information cannot be harvested
- Configuration options for cookie name and length
- Functionality for additional user updating or error logging
精彩评论