Session token/IP based user authentication added

This commit is contained in:
Christoph Haas 2015-06-14 12:33:18 +02:00
parent d866f17405
commit c87011ff84
3 changed files with 11 additions and 4 deletions

View file

@ -9,6 +9,7 @@ class ApplicationController < ActionController::Base
# and show them even before moderation.
def create_user_token
session[:token] ||= SecureRandom.hex
session[:ip] ||= request.remote_ip
end
end