module Doorkeeper::Helpers::Controller
Private Instance Methods
authenticate_admin!()
click to toggle source
# File lib/doorkeeper/helpers/controller.rb, line 23 def authenticate_admin! instance_eval(&Doorkeeper.configuration.authenticate_admin) end
authenticate_resource_owner!()
click to toggle source
# File lib/doorkeeper/helpers/controller.rb, line 9 def authenticate_resource_owner! current_resource_owner end
config_methods()
click to toggle source
# File lib/doorkeeper/helpers/controller.rb, line 36 def config_methods @methods ||= Doorkeeper.configuration.access_token_methods end
current_resource_owner()
click to toggle source
# File lib/doorkeeper/helpers/controller.rb, line 14 def current_resource_owner instance_eval(&Doorkeeper.configuration.authenticate_resource_owner) end
doorkeeper_token()
click to toggle source
# File lib/doorkeeper/helpers/controller.rb, line 32 def doorkeeper_token @token ||= OAuth::Token.authenticate request, *config_methods end
get_error_response_from_exception(exception)
click to toggle source
# File lib/doorkeeper/helpers/controller.rb, line 40 def get_error_response_from_exception(exception) OAuth::ErrorResponse.new name: exception.type, state: params[:state] end
handle_token_exception(exception)
click to toggle source
# File lib/doorkeeper/helpers/controller.rb, line 44 def handle_token_exception(exception) error = get_error_response_from_exception exception headers.merge! error.headers self.response_body = error.body.to_json self.status = error.status end
resource_owner_from_credentials()
click to toggle source
# File lib/doorkeeper/helpers/controller.rb, line 18 def resource_owner_from_credentials instance_eval(&Doorkeeper.configuration.resource_owner_from_credentials) end
server()
click to toggle source
# File lib/doorkeeper/helpers/controller.rb, line 27 def server @server ||= Server.new(self) end