Sha256: 6e33fea8a0eaa7003436d84c3b25db05e1a25eb926cecd23833cd81c27f62a90
Contents?: true
Size: 800 Bytes
Versions: 1
Compression:
Stored size: 800 Bytes
Contents
require 'doorkeeper/oauth/client/methods' require 'doorkeeper/oauth/client/credentials' module Doorkeeper module OAuth class Client def self.find(uid, method = Doorkeeper::Application.method(:by_uid)) if application = method.call(uid) new(application) end end def self.authenticate(credentials, method = Doorkeeper::Application.method(:authenticate)) return false if credentials.blank? if application = method.call(credentials.uid, credentials.secret) new(application) end end delegate :id, :name, :uid, :redirect_uri, :to => :@application def initialize(application) @application = application end attr_accessor :application end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
couchkeeper-0.6.7 | lib/doorkeeper/oauth/client.rb |