Sha256: 5354d5605ae81945d7b55fbf12da490dd56e28d4e66b7acac2178bdb610dd57a
Contents?: true
Size: 737 Bytes
Versions: 6
Compression:
Stored size: 737 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 end end end
Version data entries
6 entries across 6 versions & 1 rubygems