forked from entp/tender_multipass
Rails plugin for creating special cookies to setup automatic logins with Tender
License
eric/tender_multipass
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Tender MultiPass =============== Easily add auto-login cookie values for Tender (http://tenderapp.com) Setup ===== * Install the plugin, and include the Tender::MultiPassMethods into your user model * Set up these 3 values: Tender::MultiPass.site_key, Tender::MultiPass.cookie_domain, and Tender::MultiPass.support_domain * Use @user.tender_multipass(cookies) to modify cookies inside your controller request. * More info: http://help.tenderapp.com/faqs/setup-installation/login-from-cookies Example (Rails) ======= # /config/initializers/tender_multi_pass.rb Tender::MultiPass.class_eval do self.site_key = "abc" self.support_domain = "help.xoo.com" self.cookie_domain = ".xoo.com" end # /app/models/user.rb class User < ActiveRecord::Base include Tender::MultiPassMethods end # /app/controllers/sessions_controller.rb class SessionsController def login if user = User.authenticate(params[:login], params[:password]) user.tender_multipass(cookies, 1.week.from_now.to_i) end redirect_to "/" end end Copyright (c) 2008-* rick olson, released under the MIT license
About
Rails plugin for creating special cookies to setup automatic logins with Tender
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- Ruby 100.0%