module Smooth::UserAdapter::ClassMethods
Public Instance Methods
anonymous(params = nil, headers = nil)
click to toggle source
# File lib/smooth/user_adapter.rb, line 26 def anonymous(params = nil, headers = nil) User.new.tap do |user| user.last_request_params = params if params user.last_request_headers = headers if headers user.making_anonymous_request = true end end
find_for_smooth_api_request(id, passed_authentication_token)
click to toggle source
# File lib/smooth/user_adapter.rb, line 17 def find_for_smooth_api_request(id, passed_authentication_token) where(id: id, authentication_token: passed_authentication_token).first end
find_for_token_authentication(passed_authentication_token)
click to toggle source
# File lib/smooth/user_adapter.rb, line 21 def find_for_token_authentication(passed_authentication_token) id, token = passed_authentication_token.split(':') find_for_smooth_api_request(id, token) end