authlogic

Ruby on rails - Authlogic : periodically check if user session is valid

旧城冷巷雨未停 提交于 2019-12-30 09:32:14
问题 I'm looking for a solution allowing me to check periodically if the user session has expired and if so redirect him to the login page. I'm using Authlogic gem, so what I'm doing is call a function that make a test on current_user. My USER_SESSION_TIMEOUT is 5minutes so I make this ajax call every 5:10 minutes. <%= periodically_call_remote :url => {:controller => 'user_session', :action => 'check_session_timed_out'}, :frequency => (USER_SESSION_TIMEOUT + 10.seconds) %> def check_session_timed

Ruby on rails - Authlogic : periodically check if user session is valid

两盒软妹~` 提交于 2019-12-30 09:32:10
问题 I'm looking for a solution allowing me to check periodically if the user session has expired and if so redirect him to the login page. I'm using Authlogic gem, so what I'm doing is call a function that make a test on current_user. My USER_SESSION_TIMEOUT is 5minutes so I make this ajax call every 5:10 minutes. <%= periodically_call_remote :url => {:controller => 'user_session', :action => 'check_session_timed_out'}, :frequency => (USER_SESSION_TIMEOUT + 10.seconds) %> def check_session_timed

Routing Error when used Authlogic with Rails 3.2.9

百般思念 提交于 2019-12-25 04:47:10
问题 I have configured authlogic gem for user management needs by referring https://github.com/jonathandean/authlogic_example. I have configured everything correctly. I am using Rails 3.2.9 and ruby 1.8.7. I am getting the following error when I took localhost:3000 Routing Error undefined method `filter_parameter_logging' for ApplicationController:Class Try running rake routes for more information on available routes. Please help to resolve this. Thanks for any help :)- 回答1: I got the problem

AuthLogic UserSessions Controller Returning Nil [closed]

拥有回忆 提交于 2019-12-25 02:18:45
问题 This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 6 years ago . I've set up a new Rails app and am using Authlogic for authentication. I can happily CRUD users but there seems to be an issue with User Sessions. Error

Rails 3 Authlogic problem with single access token and logout on timeout

核能气质少年 提交于 2019-12-25 01:24:27
问题 I'm having a problem using an authlogic single access token to access a page when logout on timeout is set to true and a timeout is set. user.rb: acts_as_authentic do |c| c.logged_in_timeout = 15.minutes end user_session.rb: logout_on_timeout true controller: def single_access_allowed? ["download_xml"].include?(action_name) end If I try to access a page/method using the token it redirects straight away to my login page. The logout on timeout works when its turned on. If i remove the timeout

Recommendation for Role Gem

Deadly 提交于 2019-12-24 09:29:00
问题 I have successfully gotten authlogic working with rails 3 on windows 7 x64. But I'm lost as for what I should use for managing user privileges any suggestion? Thank you 回答1: There are lots of options for authorization. My favorites in order are: Declarative Auth: http://github.com/stffn/declarative_authorization Ryan Bates' cancan: http://github.com/ryanb/cancan ACL9: http://github.com/be9/acl9 回答2: Cancan http://github.com/ryanb/cancan is flexible enough to be easily extended with roles as

Authlogic and password and password confirmation attributes - inaccessible?

允我心安 提交于 2019-12-24 08:46:36
问题 Im trying to test my successfully creates a new user after login (using authlogic). Ive added a couple of new fields to the user so just want to make sure that the user is saved properly. The problem is despite creating a valid user factory, whenever i try to grab its attributes to post to the create method, password and password confirmation are being ommitted. I presuem this is a security method that authlogic performs in the background. This results in validations failing and the test

Access recovery mechanism if site only supports OpenID login

假装没事ソ 提交于 2019-12-24 03:06:34
问题 Say I have a site, like StackOverflow, which supports OpenID login only. Suppose someone had an account on the site, bound to his OpenID, and then he lost access to his OpenID provider (that's surely possible and not harder than losing your email password). How would he then restore access to his account? I see two options: one is the usual mail-me-a-key sequence, only appropriate if he had provided an email address. Two is he could have provided a backup OpenID for such emergencies (that's

Session Nil with Rails 3.2.6 and authlogic 3.1.3

徘徊边缘 提交于 2019-12-24 02:57:08
问题 On our production site, we are using rails 3.2.3 and authlogic 3.1.0. I am able to log into our rails application with any browser. We are currently moving to rails 3.2.6 as well as upgrading to use the asset pipeline, and as such we are also upgrading authlogic to 3.1.3. The problem is, I am able to log into production which is running rails 3.2.3 and authlogic 3.1.0, but when upgrading to rails 3.2.6 and authlogic 3.1.3 locally on a feature branch, login on both google chrome and mobile

Not able to set a current_user using Authlogic on Rails 3.0.1

微笑、不失礼 提交于 2019-12-24 01:43:01
问题 I had the official authlogic plugin running perfectly on Rails 2.3.5. I converted my application to Rails 3.0.1 and now I'm having some problems. I've included the following authlogic gem in my gemfile gem 'authlogic', :git => 'git://github.com/odorcicd/authlogic.git', :branch => 'rails3' When a user logs in, the session is saved. When calling that user session, the returned value is nil. UserSession.find returns a nil value so I'm not able to assign a current_user. sessions_controller.rb def