Grape
Grape integration
require 'doorkeeper/grape/helpers'
module API
module V1
class Users < Grape::API
helpers Doorkeeper::Grape::Helpers
before do
doorkeeper_authorize!
end
# For old versions of Grape:
# route_setting :scopes, ['user:email']
#
get :me, scopes: [:user, :read] do
current_user.to_json
end
# ...
end
end
endAuto-documented API
Last updated
Was this helpful?