cirandas.net

ref: master

plugins/oauth_provider/controllers/public/oauth_provider_plugin_public_controller.rb


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
class OauthProviderPluginPublicController < PublicController

  before_action :doorkeeper_authorize!

  def me
    user = environment.users.find(doorkeeper_token.resource_owner_id) if doorkeeper_token
    render :json => {:id =>user.login, :email => user.email}.to_json
  end

end