search for: login_from_cookie

Displaying 9 results from an estimated 9 matches for "login_from_cookie".

2006 Aug 07
1
''Remember me'' in acts_as_authenticated troubles
Hi there I''m having trouble getting the ''remember me'' functionality going in acts_as_authenticated. The issue seems to be that the login_from_cookie method is using only the first 60 characters of the remember_token string in the database, whereas the string in the db is 75 characters long. I can see in my dev log that login_from_cookie is trying to find the user but using a truncated string to do so. Any clues how to rememdy this would be ap...
2008 Jan 30
2
Where can I get "authenticate_with_http_basic"?
...;re logged in. def logged_in? current_user != :false end # Accesses the current user from the session. Set it to :false if login fails # so that future calls do not hit the database. def current_user @current_user ||= (login_from_session || login_from_basic_auth || login_from_cookie || :false) end # Store the given user id in the session. def current_user=(new_user) session[:user_id] = (new_user.nil? || new_user.is_a?(Symbol)) ? nil : new_user.id @current_user = new_user || :false end # Check if the user is authorized # # Override this...
2008 Jan 03
1
help - updated from 1.2.5 to 1.2.6 and getting undefined method 'session=' for ActionController::base
...y # :secret => ''3ac52b38782bce94aa5b8b39873f2052'' # Be sure to include AuthenticationSystem in Application Controller instead include AuthenticatedSystem # If you want "remember me" functionality, add this before_filter to Application Controller before_filter :login_from_cookie end --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonra...
2010 Apr 02
6
App_Controller and partial issues with has_many through
...has_many interests, dependent destroy Post has_many users through interests has_many interests, dependent destroy Post has_many interests Interest belongs to Post Interest belongs to User Application_Controller is as follows: class ApplicationController < ActionController::Base before_filter :login_from_cookie before_filter :find_user_interests helper :all # include all helpers, all the time session :session_key => ''_blah_session'' include AuthenticatedSystem def find_user_interests @user_interests = current_user ? current_user.interests : [] true end end Appli...
2008 Jan 08
47
specs on private methods
How does a person test private methods? Is there a way to declare them as private, but retain any tests that were written during the initial development? Thanks. -- Posted via http://www.ruby-forum.com/.
2009 Jan 12
5
Restful Authentication Uninitialized Constant in Production...
rake db:migrate RAILS_ENV=production rake aborted! uninitialized constant User::Authentication The preceding I encounter when attempting to migrate to the production database. My google powers have escaped me. Everywhere says Restful Authentication is missing in the production server. However, to validate this, I attempted this on the same server as the development, which works. So, what
2008 Jul 12
1
Re: Re stful_authentication, Internet Explorer, and unwanted http basic dialog
...9;ve modified the following method of authenticated_system.rb, but >>> there''s no difference before or after. >>> >>> Before: >>> >>> def current_user >>> @current_user ||= (login_from_session || login_from_basic_auth || >>> login_from_cookie) unless @current_user == false >>> end >>> >>> After: >>> >>> def current_user >>> @current_user ||= login_from_session unless @current_user == >>> false >>> end >>> >>> Thanks for any help. >> &gt...
2008 Jun 16
2
simple rails login system
Hey All, Just started to play around with rails a bit today by creating a login system, but I''ve run into a glitch. ###user_controller.rb### class UserController < ApplicationController def login @title = "Log In" if request.post? and params[:user] @user = User.new(params[:user]) @userfind =
2006 Jan 16
16
acts_as_authenticated current_user in a model?
What do I need to do to be able to use an acts_as_authenticated current_user in a model? Is there some sort of include or require I can do some where that would allow this? ********************************************************** Here is what I am trying to do: ********************************************************** class Setting < ActiveRecord::Base before_create :created_by_user #