class Doorkeeper::OAuth::Client

def self.authenticate(credentials, method = Application.method(:authenticate))

def self.authenticate(credentials, method = Application.method(:authenticate))
  return false if credentials.blank?
  if application = method.call(credentials.uid, credentials.secret)
    new(application)
  end
end

def self.find(uid, method = Application.method(:by_uid))

def self.find(uid, method = Application.method(:by_uid))
  if application = method.call(uid)
    new(application)
  end
end

def initialize(application)

def initialize(application)
  @application = application
end