class Api::BaseController
Public Instance Methods
current_user()
click to toggle source
# File lib/generators/petergate_api/templates/app/controllers/api/base_controller.rb, line 4 def current_user @user ||= begin if request.headers["Authorization"] # you might want to check redis or memcache to for cache invalidation ::ApiUser.new(request.headers["Authorization"]) else nil end end end