Sha256: 89a7314ade79cf6b15b55e56ec462f57c659b44fbcaa08088272e925c1161160
Contents?: true
Size: 721 Bytes
Versions: 8
Compression:
Stored size: 721 Bytes
Contents
require 'doorkeeper/oauth/client/credentials' module Doorkeeper module OAuth class Client attr_accessor :application delegate :id, :name, :uid, :redirect_uri, :scopes, to: :@application def initialize(application) @application = application end def self.find(uid, method = Application.method(:by_uid)) if (application = method.call(uid)) new(application) end end def self.authenticate(credentials, method = Application.method(:by_uid_and_secret)) return false if credentials.blank? if (application = method.call(credentials.uid, credentials.secret)) new(application) end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems