class Doorkeeper::Server
Attributes
Public Class Methods
Source
# File lib/doorkeeper/server.rb, line 7 def initialize(context) @context = context end
Public Instance Methods
Source
# File lib/doorkeeper/server.rb, line 26 def client @client ||= OAuth::Client.authenticate(credentials) end
Source
# File lib/doorkeeper/server.rb, line 39 def credentials methods = Doorkeeper.config.client_credentials_methods @credentials ||= OAuth::Client::Credentials.from_request(context.request, *methods) end
Source
# File lib/doorkeeper/server.rb, line 30 def current_resource_owner context.send :current_resource_owner end
Source
# File lib/doorkeeper/server.rb, line 22 def parameters context.request.parameters end
TODO: context should be the request
Source
# File lib/doorkeeper/server.rb, line 35 def resource_owner context.send :resource_owner_from_credentials end
TODO: Use configuration and evaluate proper context on block
Source
# File lib/doorkeeper/server.rb, line 16 def token_request(strategy) klass = Request.token_strategy(strategy) klass.new(self) end