master
1module Api
2 module V1
3 class ApiController < ApplicationController
4 before_action :restrict_access
5 attr_reader :current_user
6
7 private
8
9 def restrict_access
10 authenticate_or_request_with_http_token do |token, options|
11 @current_user = User.find_by(authentication_token: token)
12 end
13 end
14 end
15 end
16end