search for: remember_token_expires_at

Displaying 14 results from an estimated 14 matches for "remember_token_expires_at".

2007 Dec 16
2
restful_authentication: update of users' attributes on every page load upon 'Remember me' being enabled?
Hello there, I just noticed a kinda weird thing: if users log in with the ''Remember Me'' option enabled, their records in the db get updated everytime the user reloads a page, because apparently restful_authentication''s code updates the remember_token_expires_at & remember_token attributes for each page load (not only once on the actual login (from cookie). Wouldn''t it make much more sense to set this remember_token_expires_at and the corresponding token once only and that''s it? Or am I missing something? Just wanna make sure the db...
2008 Aug 01
0
Help with Access Control
...ord, login.salt) if login.crypted_password != expected_password login = nil end end login end def password @password end def password=(pw) @password = pw create_new_salt self.crypted_password = User.encrypted_password(self.password, self.salt) end def remember_token? remember_token_expires_at && Time.now.utc < remember_token_expires_at end # These create and unset the fields required for remembering users between browser closes def remember_me self.remember_token_expires_at = 2.weeks.from_now.utc self.remember_token = encrypt("#{email}-- #{remember_token_e...
2008 Sep 12
1
restful_authentication rspec failures "Mysql::Error: Incorrect datetime value:"
...ate authenticated User Sessions rake db:migrate # 288 examples, 193 failures 1) ActiveRecord::StatementInvalid in ''SessionsController on signout redirects me to the home page'' Mysql::Error: Incorrect datetime value: ''2008-09-13 21:22:52 UTC'' for column ''remember_token_expires_at'' at row 1: INSERT INTO `users` (`salt`, `updated_at`, `crypted_password`, `remember_token_expires_at`, `id`, `remember_token`, `login`, `created_at`, `email`) VALUES (''356a192b7913b04c54574d18c28d46e6395428ab'', ''2008-09-12 21:22:52'', ''6165929d55...
2008 Jun 29
3
Working around/with Restful Authentication
...ane.org'', :password => ''123456'', :password_confirmation => ''123456'') => #<User id: nil, login: nil, email: "user-n8tE+Mx9DRM@public.gmane.org", crypted_password: nil, salt: nil, created_at: nil, updated_at: nil, remember_token: nil, remember_token_expires_at: nil, activation_code: nil, activated_at: nil, is_seller: false> >> u.save => false Any clues as to how I could create a user without actually being sent to the user controller''s create action? The before_save and before_create actions are private. Thanks, Nik --~--~---------...
2008 Jun 20
15
before_save model callback rspec testing
hi all, i''m learning rspec and i can''t figure out how to test if a callback is executed in a model. my model code is: class User < ActiveRecord::Base before_save :encrypt_password ... def encrypt(password) self.class.encrypt(password, salt) end thanks a lot, cs. -- Posted via http://www.ruby-forum.com/.
2008 Jan 30
2
Where can I get "authenticate_with_http_basic"?
...token in the cookie. def login_from_cookie user = cookies[:auth_token] && User.find_by_remember_token(cookies[:auth_token]) if user && user.remember_token? user.remember_me cookies[:auth_token] = { :value => user.remember_token, :expires => user.remember_token_expires_at } self.current_user = user end end end ==========================end authenticated_system.rb file======================== --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk&quot...
2007 Jul 18
3
Help. Acts_as_Authenticated plugin stops working for me?
...hod `activation_code'' for #<User:0x3b6dbd @errors=#<ActiveRecord::Errors:0x1a1a1c6 @errors={}, @base=#<User: 0x3b6dbd ...>>, @attributes={"salt"=>"d580c223adee13c8723434e3987a0787ad124e5b", "updated_at"=>Wed Jul 18 02:47:19 BST 2007, "remember_token_expires_at"=>nil, "crypted_password"=>"78dfec22ed3e7418647c7e90e22d0e4e93c5f375", "id"=>6, "remember_token"=>nil, "email"=>"erv2-7Ts6kVb0ZJk@public.gmane.org", "login"=>"erv2", "created_at"=>Wed...
2008 Feb 07
1
ActiveRecord 'find_or_initialize_by' dynamic finder bug? Ignoring conditions.
...l` = ''foo-+RB1Aph5k6s@public.gmane.org'') LIMIT 1 => #<User id: 2, login: nil, email: "foo-+RB1Aph5k6s@public.gmane.org", crypted_password: nil, salt: nil, created_at: "2008-02-07 00:48:48", updated_at: "2008-02-07 00:48:48", remember_token: nil, remember_token_expires_at: nil, activation_code: nil, activated_at: nil, state: "passive", deleted_at: nil, password_reset_at: nil, forgot_password_code: nil, name: nil, beta_code: nil, beta_approved_at: nil> Thanks, Glenn --~--~---------~--~----~------------~-------~--~----~ You received this message becaus...
2009 Jul 13
6
first app on Dreamhost with Passenger : "rails needs to know your username and password" ?
I am trying to deploy my first rails app with Dreamhost. I ftp''d over my existing app, turned on Passenger and pointed it to my /public directory. When I go to ''www.mydomain.com'' I get the ''Ruby on Rails: Welcome aboard'' default page, including the following: Getting started Here’s how to get rolling: 1. Create your databases and edit
2007 Dec 21
0
db:migrate problem
...def self.up create_table :people, :force => true do |t| t.string :login t.string :email t.string :crypted_password, :limit => 40 t.string :salt, :limit => 40 t.timestamps t.string :remember_token t.datetime :remember_token_expires_at t.string :openid_url end add_index :people, :login add_index :people, :email add_index :people, :openid_url end ... end 004_drop_login_name: class DropLoginName < ActiveRecord::Migration def self.up remove_index :people, :login remove_column :people, :log...
2007 Sep 20
1
Relationship Proxies?
...cdc @attributes={"salt"=>"7e3041ebc2fc05a40c60028e2c4901a81035d3cd", "updated_at"=>nil, "contact_info_id"=>nil, "crypted_password"=>"00742970dc9e6319f8019fd54864d3ea740f04b1", "user_group_id"=>"10", "remember_token_expires_at"=>nil, "id"=>"2", "disabled"=>"0", "remember_token"=>nil, "locale"=>nil, "login"=>"aaron", "created_at"=>"2007-09-18 19:10:55"}> >> og = aaron.user_group => #&lt...
2010 Oct 11
5
Object lost in memory/trashed?
...commentable_id: "29" updated_at: 2010-10-11 00:44:02 id: "41" user_id: "2" attributes_cache: created_at: 2010-10-11 00:44:02 Z --- !ruby/object:User attributes: created_at: 2010-05-23 18:31:02 activated_at: 2010-06-08 22:23:19 send_news: "1" remember_token_expires_at: updated_at: 2010-09-19 22:36:42 activation_code: old_email: id: "2" saved_once: "1" email_hash: 672585615_3008d2bf2e8e7f4455d48212f99a9343 remember_token: short_name: olance diagrams_count: "16" display_name: Olivier Lance attributes_cache: {} Whe...
2007 Feb 10
5
acts_as_authenticated strangeness
...nd_by_login(params[:login]) session[:role]=user.organisation session[:user_id]=user.id if params[:remember_me] == "1" self.current_user.remember_me cookies[:auth_token] = { :value => self.current_user.remember_token , :expires => self.current_user.remember_token_expires_at } else flash[:notice] = "Logged in successfully" end redirect_back_or_default(:controller => ''/event'', :action => ''calendar'') flash[:notice] = "Logged in successfully" end end any ideas? or anyone experi...
2008 Jan 16
5
named route new_session not working
Anyone have any idea why a named route would NOT work? I did rake routes to make sure it was there and it was but for some reason new_session doesn''t work. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group,