working on the auth structure for the API

This commit is contained in:
cktricky
2014-03-12 13:24:37 -04:00
parent 932d2304f9
commit f4f5d5744c
+13 -4
View File
@@ -1,11 +1,20 @@
class Api::V1::UsersController < ApplicationController
skip_before_filter :authenticated
before_filter :valid_api_token
respond_to :json
def index
respond_with ({:hi => :world})
def valid_api_token
authenticate_or_request_with_http_token do |token, options|
# TODO :add some functionality to check if the HTTP Header is valid
return true
end
end
def index
respond_with User.all
end
end