woofound/simplewoo — pull request #9 by tomprats (2013-11-11 20:22:12+00:00)
Title: Added trusted auth

Necessary because to actually use trusted auth, the core api does the following (https://github.com/woofound/core-api/blob/master/app/controllers/application_controller.rb)

if trusted_auth? && user
@current_user = user
return
end

if user && user.valid_password?(password)
@current_user = user
else
if !email.blank? || !password.blank?
raise UserNotFound
end
end

Currently we require either an api token or both email and password. We should be allowing password to be blank if we're using trusted auth