remember-me

Django “Remember Me” with built-in login view and authentication form

六月ゝ 毕业季﹏ 提交于 2019-11-28 15:44:02
How can I reuse the original admin login() and AuthenticationForm to set longer cookie length for users with "remember me" option checked at login page? I am currently using the built-in login through urls.py url(r'^login/$','django.contrib.auth.views.login', {'template_name': 'authentication/login.html'}, name='login'), The checkbox is implemented in my login.html as: <label><input name="remember_me" type="checkbox">Keep me logged in</label> but I am not sure how to pass that information through the AuthenticationForm to the django.contrib.auth.views.login Currently, if the user logs

Symfony2: “Remember me” tries to authenticate by username instad of email

我的梦境 提交于 2019-11-28 10:34:03
问题 I have an application with user authenticaton against database. The property I use is email: providers: administrators: entity: class: CorabMainBundle:User property: email Authentication works great! But I have huge problems getting the remember me functionality to work. After several hours I think I found the problem but I don't know how to solve it... Symfony2 seems to try to authenticate with the username instead of email in case of remember me. dev.log says the following: [2013-10-21 23

ASP.NET MVC RememberMe

妖精的绣舞 提交于 2019-11-28 03:30:25
After searching a lot i did not get any answers and finally i had to get back to you. Below i am explaining my problem in detail. It's too long, so please don't quit reading. I have explained my problem in simple language. I have been developing an asp.net mvc project. I am using standard ASP.NET roles and membership. Everything is working fine but the remember me functionality doesn't work at all. I am listing all the details of work. Hope you guys can help me out solve this problem. I simply need this: I need user to login to web application. During login they can either login with remember

Best practice for remember me feature [duplicate]

拜拜、爱过 提交于 2019-11-27 15:09:16
问题 This question already has answers here : What is the best way to implement “remember me” for a website? [closed] (4 answers) Closed 6 years ago . I am using 2 variables in cookie (7 day expiration) which is user id and hash. Hash is sha1 encode of user agent and user id. In this case some hacker can login who is know stolen cookie's browser. Which way should I follow or which practice is best for remember me security problems? 回答1: While you can hash a user_id and secret_key, anyone who

Remember Me functionality not working in Symfony2

无人久伴 提交于 2019-11-27 14:07:22
问题 I have implemented remember me functionality in Symfony2. When I log in with remember me box checked, cookie named "REMEMBERME" gets created. That cookie is also available if I close browser and open it after many hours. But when I load home page of my application, the cookie gets automatically deleted and I see no user logged in. Can anyone explain me the reason for cookie deletion? remember_me: key: qwerty lifetime: 604800 path: / domain: ~ This is my security.yml file section EDIT: I have

Spring Security Invalid remember-me token (Series/token) mismatch. Implies previous cookie theft attack

≡放荡痞女 提交于 2019-11-27 14:01:50
问题 i have a GWT application using Spring Security3.1.2 running in a tomcat 7. i am using UsernamePasswordAuthenticationFilter and PersistentTokenBasedRememberMeServices to persists logins on the DB. moreover, i am using tomcat PersistentManager to save session in DB as well. now my problem is that every time i try to login i get Invalid remember-me token (Series/token) mismatch CookieTheftException (i added the stack below). i tried deleting the session from tomcat_sessions table as follows

asp.net “Remember Me” cookie

我们两清 提交于 2019-11-27 13:22:13
问题 I have implemented remember me option in my asp.net webform by using this, protected void LBtnSubmit_Click(object sender, EventArgs e) { if (this.ChkRememberme != null && this.ChkRememberme.Checked == true) { HttpCookie cookie = new HttpCookie(TxtUserName.Text, TxtPassword.Text); cookie.Expires.AddYears(1); Response.Cookies.Add(cookie); } } Am i doing it the right way? Any suggestion.. I am using windows authentication and i am not using asp.net membership .. 回答1: Rather than directly storing

Log user in with remember-me functionality in Spring 3.1

假如想象 提交于 2019-11-27 10:56:47
问题 I currently log users in programmatically (like when they login through Facebook or other means than using my login form) with: SecurityContextHolder.getContext().setAuthentication( new UsernamePasswordAuthenticationToken(user, "", authorities) ); What I want to do instead is log the user in as if they set the remember-me option on in the login form. So I'm guessing I need to use the RememberMeAuthenticationToken instead of the UsernamePasswordAuthenticationToken ? But what do I put for the

Django “Remember Me” with built-in login view and authentication form

允我心安 提交于 2019-11-27 09:19:26
问题 How can I reuse the original admin login() and AuthenticationForm to set longer cookie length for users with "remember me" option checked at login page? I am currently using the built-in login through urls.py url(r'^login/$','django.contrib.auth.views.login', {'template_name': 'authentication/login.html'}, name='login'), The checkbox is implemented in my login.html as: <label><input name="remember_me" type="checkbox">Keep me logged in</label> but I am not sure how to pass that information

Implementing “Remember Me” Feature in ASP.NET MVC

妖精的绣舞 提交于 2019-11-27 06:21:17
I'm trying to implement a "remember me" feature to my login form. I am using ASP.NET MVC as my web application. I managed to get the cookie stuff working, but I failed to automatically login the user in case he/she checked the remember me checkbox before. I know what the problem is but I do not know how to solve it. In my HomeController I have the following: private LoginViewModel CheckLoginCookie() { if (!string.IsNullOrEmpty(_appCookies.Email) && !string.IsNullOrEmpty(_appCookies.Password)) { var login = new LoginViewModel { Email = _appCookies.Email, Password = _appCookies.Password };