working on the auth structure for the API
This commit is contained in:
@@ -1,11 +1,20 @@
|
|||||||
class Api::V1::UsersController < ApplicationController
|
class Api::V1::UsersController < ApplicationController
|
||||||
|
|
||||||
skip_before_filter :authenticated
|
skip_before_filter :authenticated
|
||||||
|
before_filter :valid_api_token
|
||||||
|
|
||||||
respond_to :json
|
respond_to :json
|
||||||
|
|
||||||
def index
|
def valid_api_token
|
||||||
respond_with ({:hi => :world})
|
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
|
end
|
||||||
|
|
||||||
|
def index
|
||||||
|
respond_with User.all
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user