Sha256: e3b35a4843e8a41e5a263d3caab0377f3e99ddcb36d4bae0cd6340877cc521f9
Contents?: true
Size: 699 Bytes
Versions: 15
Compression:
Stored size: 699 Bytes
Contents
# frozen_string_literal: true 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 if credentials.blank? if (application = method.call(credentials.uid, credentials.secret)) new(application) end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems