Where do I put consecutive_failed_logins_limit settings ?

71 views
Skip to first unread message

Amiruddin Nagri

unread,
Jun 20, 2010, 12:47:03 PM6/20/10
to Authlogic

I want to set consecutive_failed_logins_limit to 5, where and how should I put it ?

I checked the github home page, it specifies what settings to do but doesn't specify where to do it, should I create a file in initializer and do it or put it in my User object which calls acts_as_authentic.

What is the suggested/recommended approach.

Regards,
Amiruddin Nagri

Eric Fleming

unread,
Jun 20, 2010, 2:19:32 PM6/20/10
to auth...@googlegroups.com
You place them in your UserSession model like so:

class UserSession < Authlogic::Session::Base
consecutive_failed_logins_limit 5
failed_login_ban_for 2.hours
end

--
You received this message because you are subscribed to the Google Groups "Authlogic" group.
To post to this group, send email to auth...@googlegroups.com.
To unsubscribe from this group, send email to authlogic+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/authlogic?hl=en.



--
Eric Fleming
efle...@gmail.com

Amiruddin Nagri

unread,
Jun 20, 2010, 2:27:44 PM6/20/10
to auth...@googlegroups.com
Thanks Eric,

that worked, and looks at the right place too.

Cheers,
Amir
Reply all
Reply to author
Forward
0 new messages